Webpack: Difference between revisions
(Created page with "== Overview == [https://webpack.js.org/ Webpack] bundles JavaScript. It can also bundle other assets such as css, and images. I can compile SASS. It can serve as an alterna...") |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
It can serve as an alternative to [https://webpack.js.org/ Gulp]. | It can serve as an alternative to [https://webpack.js.org/ Gulp]. | ||
=== Pros === | |||
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. <ref>[https://www.toptal.com/front-end/webpack-browserify-gulp-which-is-better Webpack or Browserify & Gulp: Which Is Better?] - toptal.com</ref> | |||
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 === | |||
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 == | |||
<references /> | |||
Latest revision as of 16:04, 8 September 2021
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]
- ↑ Webpack or Browserify & Gulp: Which Is Better? - toptal.com