Sha256: dc03ed1968d8ab3518e347f53ae5cadf47cf064ab873a07878c2d190c17ea4d5
Contents?: true
Size: 1.3 KB
Versions: 114
Compression:
Stored size: 1.3 KB
Contents
# Webpack V1 Tips The following only apply to Webpack V1. Take 1 hour and update to v2! It's worth it! ## Use the `--bail` Option When Running Webpack for CI or Deployments if using Webpack V1 For your scripts that statically build your Webpack bundles, use the `--bail` option. This will ensure that CI and your product deployment **halt** if Webpack cannot complete! For more details, see the documentation for [Webpack's `--bail` option](https://webpack.js.org/configuration/other-options/#bail). Note, you might not want to use the `--bail` option if you just want to depend on Webpack returning a non-zero error code and you want to see all the errors, rather than only the first error. ## Entry Points You should ensure you configure the entry points correctly for webpack if you want to break out libraries into a "vendor" bundle where your libraries are packaged separately from your app's code. If you send web clients your vendor bundle separately from your app bundles, then web clients might have the vendor bundle cached while they receive updates for your app. You need both include `react-dom` and `react` as values for `entry`, like this: ``` entry: { // See use of 'vendor' in the CommonsChunkPlugin inclusion below. vendor: [ 'babel-core/polyfill', 'react', 'react-dom', ], ```
Version data entries
114 entries across 114 versions & 1 rubygems