Webpack

From Littledamien Wiki
Revision as of 16:04, 8 September 2021 by Video8 (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview[edit]

Webpack bundles JavaScript. It can also bundle other assets such as css, and images. I can compile SASS.

It can serve as an alternative to Gulp.

Pros[edit]

You put includes into the source and set an entry point for Webpack. This avoids having to update any Webpack configuration to accommodate changes in the source code. Easier to maintain. [1]

Gulp and it's associated packages have a huge tree of node module dependencies. If npm is reporting vulnerabilities during install, it will report all of those vulnerabilities. Supposedly it is not a concern, but it makes it difficult to separate issues that are genuine concerns vs irrelevant reporting.

Cons[edit]

There are commonly-used loaders to compile SASS, but this isn't really what the tool is designed to do, so you're kind of performing a work-around when using this way.

You have to accept the design implications of bundling with Webpack, which may be overkill and adds to the learning curve.

Notes[edit]