question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bundling/minifying CSS/JS in 2.0 preview released templates

See original GitHub issue

The mvc and razor templates ship with bundleconfig.json but I think the integration is broken. I’m not using VS. The 2.0 uses blank platform meta package dependency Microsoft.AspNetCore.All and cli tool for Secret manager tool Microsoft.Extensions.SecretManager.Tools and that’s all. Whenever I made a changes in content client code (JS, CSS that is) I would expect new minified version to be created, but the bundler integration is broken. How am I supposed to use bundler with 2.0 version? With 1/1.1 everytime the build command is used the bundler produces updated content. Thanks!

dotnet --info
.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mlorbetskecommented, May 25, 2017

Just tried this out with a 2.0 MVC app (using a modified BuildBundleMinifier - PR)

> dotnet build
Microsoft (R) Build Engine version 15.3.246.41955 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  
  Bundler: Begin processing bundleconfig.json
  	Minified wwwroot/css/site.min.css
  	Minified wwwroot/js/site.min.js
  Bundler: Done processing bundleconfig.json
  tmp99 -> /Users/mlorbe/projects/tmp99/bin/Debug/netcoreapp2.0/tmp99.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:04.42
> dotnet --info
.NET Command Line Tools (2.0.0-preview2-006127)

Product Information:
 Version:            2.0.0-preview2-006127
 Commit SHA-1 hash:  946ea7980a

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0-preview2-006127/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview2-25319-02
  Build    : 7983b575ebcbdc3a825eea4b141ff7fb69d25f9d
0reactions
mlorbetskecommented, Sep 22, 2017

This issue was moved to aspnet/templating#20

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET MVC 4 Highlights - Part 2: Bundling and ...
In this installment, I'm going to focus on one of MVC's most useful features: integrated JavaScript and CSS bundling and minification.
Read more >
Has something replaced bundleconfig.json in ASP.NET ...
When I create a new ASP.NET MVC Core targeting 2.1 RC1, it doesn't create the bundleconfig.json file which is used for bundling and...
Read more >
uglify-js-minify-css-allfiles
Fast, reliable, and secure dependency management.
Read more >
UI/AspNetCore/Bundling Minification - ABP Documentation
There are many ways of bundling & minification of client side resources (JavaScript and CSS files). Most common ways are: Using the Bundler...
Read more >
How to bundle css and minify js file
1) Go to Control Panel -> Design -> Click Download Theme button -> Then choose to download "All Files". 2) Save it into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found