Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both foo.js and foo.min.js are bundled #6

Open
RudeySH opened this issue Jan 28, 2017 · 3 comments
Open

Both foo.js and foo.min.js are bundled #6

RudeySH opened this issue Jan 28, 2017 · 3 comments

Comments

@RudeySH
Copy link

RudeySH commented Jan 28, 2017

If a view folder contains both a regular JavaScript file, and a minified version, Dynamic Bundle includes both files in the generated bundle.

Dynamic Bundle should ignore the minified version if there is a regular version. ASP.NET itself should take the minified version in Release mode.

Same goes for bar.css and bar.min.css by the way.

@Montago
Copy link

Montago commented Jun 20, 2018

I think you are supposed to delete the .min. version and let the bundler handle everything.

optimally it would pick the .min. version and simply inline it though...

@RudeySH
Copy link
Author

RudeySH commented Jun 20, 2018

Deleting the minified file definitely prevents Dynamic Bundles from bundling the same thing twice, but you shouldn't have to do it. It's a problem that is easily fixed in Dynamic Bundles. Also, deleting files is not always an option. For example, when you're using a package manager to download your dependencies, you almost always get a non-minified and a minified version, and there's no point in deleting one of them because an update of dependencies automatically restores them.

Furthermore, I don't consider it optimal to always pick the minified version. While developing it's beneficial to use non-minified scripts. This improves the debugging experience when using browser developer tools.

@Montago
Copy link

Montago commented Jun 20, 2018

What i meant was:

Debug -> pick normal JS
Release / Minify / Bundle -> pick .min.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants