-
Notifications
You must be signed in to change notification settings - Fork 6.7k
No more minified assets in npm distribution? #5522
Comments
Edit: I stand corrected, it was done on purpose. After talking with team it seems like it was removed due to most people not using them since people tend to minify their own projects. Do you have a strong reason to want it back other than most libraries do it? Do you not minify your project files? |
Yes, the main reason I would like to see it returned is for consistency with other libraries. This isn't just me being a purist, though. In my project, I have:
These two classes of assets have different processing requirements. For example, my own assets are: concatenated, transpiled from ES2015 (babel), minified, fingerprinted, and source mapped:
3rd party assets have (at least until now) typically been distributed as ES5 and already minified (often, but not always, with source maps); so there are fewer processing steps required for those:
You could certainly argue that adding an But it seems (to me) wrong to require all users of your library to do their own minification when other libraries don't. It seems a rather arbitrary choice. Another (albeit lesser) reason for including minified assets would be to ensure that most users are running unmodified official code. I wonder how many issues might be raised in future that are in fact problems introduced by different compression tools/versions (eg. YUI compressor, jscompress, uglify etc.)? I haven't used enough of these tools to know whether it is possible for one to introduce a bug/problem into the minified code; but I can certainly imagine that if that were the case, you may see issues logged here as a result. Such issues could be easily triaged by asking whether it can reproduced on the unminified version; but providing official minified versions would avoid these potential issues entirely. |
It seems dirty to include it when a large portion, if not most, using npm are likely also using CommonJS as well. It adds overhead to whole I'm willing to revisit that decision, but can't say I like encouraging people to not concat and minify their assets. WDYT @Foxandxss ? |
I can see both opinions to be valid. I think that libraries are shifting to not give .min versions. Nowadays you do a The other way is when you cherry pick what you need, with that you directly can't use a .min For older workflows (no require), I think that it is a good practice to have a uglifier. At the end you need to uglify your app, so you can uglify everything. I prefer that against uglifying my app and then concat third party .min files. |
Thanks for your responses, @wesleycho & @Foxandxss. My app uses an old-style workflow (not using modules/bundling with Browserify/Webpack/Systemjs), but I see your point that in modern, module-based bundling; .min assets no longer have as much value. I'm not entirely sure I follow the line of thinking that including minified versions is
If it were up to me, I would include both minified and non-minified versions; to support both old and new use cases. If the only real objection to restoring the minified versions would be a slight slowdown in |
I'm not hugely against including the minified versions again, and sort of anticipated this issue. I guess this comes down to our intentions - @Foxandxss what are your thoughts? Those not using TS/ES6/commonjs probably see this problem more acutely. |
After discussion with the team, I'm closing this as something we aren't interested in supporting. We understand the potentially pain with older workflows, but we encourage more modern practices with the use of a tool for concating and minifying vendor assets. |
Fair enough. Thanks for clarify the project's intentions. |
Per angular-ui/bootstrap#5522 upstream feels users should minimize the files themselves. Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Ben Shum <ben@evergreener.net>
Bug description:
Previously
angular-ui-bootstrap@0.14.2
(installed via npm) included minified assets as part of the distribution:Current
angular-ui-bootstrap@1.1.2
moves the assets to adist/
directory, but no longer includes minified versions:Was this a conscious decision to stop distributing minified versions in the latest npm packages?
I ask not because it would be difficult to minify these scripts myself (I'm already minifying my own assets as part of a build process). Rather, this change puts
angular-ui-bootstrap
out of step with every other 3rd party package included my app, each of which includes minified assets as part of their official distributions:Please consider reintroducing minified assets into the official npm distribution, if only for consistency with other popular npm packages.
Link to minimally-working plunker that reproduces the issue:
N/A
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.0
UIBS: 1.1.2
Bootstrap: 3.3.6
The text was updated successfully, but these errors were encountered: