-
Notifications
You must be signed in to change notification settings - Fork 44
Ability to minify raw files #1
Comments
Hey, instead for writing a loader which is a combination of the A easier way is, as the script-loader is often used with libraries, provide minimized code The |
Just saw you closed this - after reading your comments, I was able to replace all script-loaders with variations on imports/exports. Sometimes I'll use it for a convenient first-draft and then optimize after inspecting the library. Planning to write an article about it.. so nice.. Thanks as always! |
Sounds nice. I would love to see more blog posts about webpack... 😄 |
script-loader uses raw-loader, so the require()'ed script does not undergo any processing.
It would be nice if the webpack --optimize-minimize would compress scripts loaded with script-loader.
I started toying with a 'minscript-loader' using uglify-js, which is pretty easy https://github.com/mishoo/UglifyJS2#the-simple-way
but I end up duplicating the code from script loader anyways, so there should be a better way.
The text was updated successfully, but these errors were encountered: