Answer the question
In order to leave comments, you need to log in
Should you use webpack in every project?
Hey Ya. Here is my portfolio project, I need to use babel and I need to compress pictures, I thought to start delving into webpack, because it is now actively used on the web. Do you always use webpack regardless of the project? Or if there are no js scripts for merging, then don't use it?
Answer the question
In order to leave comments, you need to log in
Common codebase, even if you don't use all the features, just copy the previous pack and customize. Why do something 2-n times?
In addition to webpack, there is also rollup and it simply has no options for building libraries, since the output is one module without wrappers, well, es-modules can do
it. Well, it’s very good for small projects, especially in conjunction with the google closure compiler - the bundles are very compact.
Webpack, on the other hand, has a few more options, in particular for various kinds of automation, due to its very powerful plugin system, which allows you to intervene in almost every step of the build process. Well, with the division into chunks, he will be better.
In general, for libraries and small projects - rollup, for medium and large projects - webpack.
Without a bundler, you can only live normally under a node. And although modern browsers and electron can use modules, the bundler also becomes a performance issue, at least throwing out dead code (unless, of course, it gets in the way).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question