Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ParcelJS - The next generation of web bundler

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

ParcelJS - The next generation of web bundler

A introduction to Parcel, a much faster and simpler alternative to Webpack and why it would be the tool of choice for your next web project.

Avatar for Timothy Dang

Timothy Dang

August 08, 2018
Tweet

Other Decks in Technology

Transcript

  1. What is Parcel? A super light-weight, zero-configuration bundler tool Almost

    no learning curve Released in December 2017 Part of the alternatives to Webpack (apart from Browserify, Rollup, Fusebox)
  2. What is Parcel? A super light-weight, zero-configuration bundler tool Almost

    no learning curve Released in December 2017 Part of the alternatives to Webpack (apart from Browserify, Rollup, Fusebox) Performance focus - multicore compilation, filesystem cache for fast rebuilds.
  3. What is Parcel? A super light-weight, zero-configuration bundler tool Almost

    no learning curve Released in December 2017 Part of the alternatives to Webpack (apart from Browserify, Rollup, Fusebox) Performance focus - multicore compilation, filesystem cache for fast rebuilds. Developer experience focus (friendly error logging & no-config HMR)
  4. What is Parcel? A super light-weight, zero-configuration bundler tool Almost

    no learning curve Released in December 2017 Part of the alternatives to Webpack (apart from Browserify, Rollup, Fusebox) Performance focus - multicore compilation, filesystem cache for fast rebuilds. Developer experience focus (friendly error logging & no-config HMR) Provides API to customise and write your own bundler
  5. But, wait.. Webpack 4 is also zero-config, isn’t it? You

    no longer have to specify an entry and output.
  6. But, wait.. Webpack 4 is also zero-config, isn’t it? You

    no longer have to specify an entry and output. Still need a webpack.config.js in most projects.
  7. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files
  8. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable)
  9. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable) Configuration dot files (package.json, .babelrc, .postcssrc) webpack.config.js + dot files
  10. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable) Configuration dot files (package.json, .babelrc, .postcssrc) webpack.config.js + dot files Dev server Support out of the box with HMR webpack-dev-server with HMR
  11. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable) Configuration dot files (package.json, .babelrc, .postcssrc) webpack.config.js + dot files Dev server Support out of the box with HMR webpack-dev-server with HMR Compile time Multi-core. Compile code in parallel. Multi-thread and multi-core in webpack 4
  12. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable) Configuration dot files (package.json, .babelrc, .postcssrc) webpack.config.js + dot files Dev server Support out of the box with HMR webpack-dev-server with HMR Compile time Multi-core. Compile code in parallel. Multi-thread and multi-core in webpack 4 Caching Agressive FS caching mechanism Full-caching hasn’t been implemented yet.
  13. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable) Configuration dot files (package.json, .babelrc, .postcssrc) webpack.config.js + dot files Dev server Support out of the box with HMR webpack-dev-server with HMR Compile time Multi-core. Compile code in parallel. Multi-thread and multi-core in webpack 4 Caching Agressive FS caching mechanism Full-caching hasn’t been implemented yet. Plugins Only a handful of plugins Well supported community of plugins, loaders
  14. Parcel vs Webpack 3 & 4 PARCEL WEBPACK Entry points

    index.html, JS, TS files JS, TS files Outputs Separate files for CSS, JavaScript bundle, images, etc. (Configurable) Inline by default (Configurable) Configuration dot files (package.json, .babelrc, .postcssrc) webpack.config.js + dot files Dev server Support out of the box with HMR webpack-dev-server with HMR Compile time Multi-core. Compile code in parallel. Multi-thread and multi-core in webpack 4 Caching Agressive FS caching mechanism Full-caching hasn’t been implemented yet. Plugins Only a handful of plugins Well supported community of plugins, loaders Code splitting Supported out of the box with zero-configuration using dynamic import() statement. Supported with entry points, CommonChunkPlugin or import() statement
  15. Parcel supports these transformations CSS (SASS, LESS, Stylus, PostCSS) Images

    Babel JSX for React / Preact PostHTML TypeScript ReasonML/BuckleScript - ReasonReact
  16. Is Parcel ready for real-world production app? Almost yes.. There’s

    still a few things to watch out for… Give it a try and experience it yourself.
  17. Is Parcel ready for real-world production app? Almost yes.. There’s

    still a few things to watch out for… Give it a try and experience it yourself. It’s a great tool of choice depends on your use case.
  18. Is Parcel ready for real-world production app? Almost yes.. There’s

    still a few things to watch out for… Give it a try and experience it yourself. It’s a great tool of choice depends on your use case.
  19. Is Parcel ready for real-world production app? Almost yes.. There’s

    still a few things to watch out for… Give it a try and experience it yourself. It’s a great tool of choice depends on your use case.
  20. Links Parcel on GitHub https://github.com/parcel-bundler/parcel https://github.com/fathyb/parcel-plugin-typescript —  Parcel plugin for

    better TS support https://github.com/fathyb/parcel-plugin-angular —  Parcel plugin for Angular https://github.com/parcel-bundler/awesome-parcel —  Awesome list of everything Parcel related Worth having a look at https://github.com/tensorflow/tfjs-examples - TensorFlowJS examples built with Parcel