14

I'm wondering is there any solid reason I should replace Webpack with Parcel in Angular 4+ versions? I mean there are a lot of configuration from the Angular team which are specific for Webpack and I'm wondering is it worth it? Will there be any functionality that cannot be replaced? Why should I or shouldn't do it?

Andrew Stegmaier
  • 3,429
  • 2
  • 14
  • 26
Marin Takanov
  • 1,079
  • 3
  • 19
  • 36
  • 1
    Parcel will make larger bundles than webpack unfortunately. The advantage is that you don't need to know anything about webpack to compile your app, and it can be faster under ideal conditions. Don't stress too much about it, I'd recommend angular cli over both, it's enough for most projects. – RaidenF Jul 25 '18 at 14:07

2 Answers2

13

Parcel is just easier to setup by yourself (it has 0 config, like, legit) and you don't have to worry about it.

In case of angular, if you are using angular CLI, this has a bunch of configs out of the box that are going to be updated when its necessary so you don't have to worry about it.

If i'm starting a new project (without any cli of similar things) i would stick with parcel, otherwise go with the default one.

PlayMa256
  • 6,603
  • 2
  • 34
  • 54
4

Parcel and webpack differ in how complicated applications you can build without needing a config file

Parcel

Parcel Does not require Configuration

  1. Parcel creates separate files for CSS, JavaScript bundle, images, etc.
  2. Parcel supports the following transforms without needing a Parcel config-file:
    • CSS
    • SCSS
    • Images
    • Babel
    • PostCSS
    • PostHTML
    • TypeScript
    • ReasonML/BuckleScript ReasonReact
  3. Parcel autodetects what transforms are needed by checking what dependencies are installed and what config files exist.

Webpack

  1. webpack inlines everything in the JavaScript bundle

With webpack, the only features you get without a config file is default input and output files. If you need anything else, such as babel, SCSS, etc, you need the webpack.config.js-file

For most real projects you will still need a config file when you are using webpack 4

For MoreInfo: http://blog.jakoblind.no/parcel-webpack/

31piy
  • 23,323
  • 6
  • 47
  • 67
Chellappan வ
  • 23,645
  • 3
  • 29
  • 60