简体   繁体   中英

When using Webpack and Babel, what is the best way to turn off compression?

I'm trying to get more familiar with webpack. It's my understanding that if I'm not including the uglify plugin, that dist/bundle.js shouldn't be minimized or compressed, but it seems like it is.

https://gist.github.com/dcvezzani/bb535a2236ef160b0769b86ec10e526b

I thought How to build minified and uncompressed bundle with webpack? might help, but perhaps webpack has changed so that the answers there are not relevant anymore.

Does webpack use its own compression? For educational purposes, how would I run webpack so that I get my bundle, but the content is not compressed or minimized?

这个答案提到了module.exports.optimization.minimize中的webpack.config.js并将其设置为false帮助我从webpack获得了漂亮的捆绑包。

you may forget to set webpack.mode to "development"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM