- For versions prior to v6, see the 5.x stable branch of rails/webpacker.
- Please see v6 Upgrade Guide to go from version prior to v6.
Changes since last non-beta release.
Please add entries here for your pull requests that are not yet released.
v6.2.0 - March 22, 2022
- Make manifest_path configurable, to keep manifest.json private if desired. PR 78 by jdelStrother.
- Rewrite webpack module rules as regular expressions. Allows for easy iteration during config customization. PR 60 by blnoonan.
- Initialization check to ensure shakapacker gem and NPM package version are consistent. Opt-in behaviour enabled by setting
ensure_consistent_versioning
configuration variable. PR 51 by tomdracz. - Add
dev_server.inline_css: bool
config option to allow for opting out of style-loader and into mini-extract-css-plugin for CSS HMR in development. PR 69 by cheald.
- Increase default connect timeout for dev server connections, establishing connections more reliably for busy machines. PR 74 by stevecrozz.
- Allow multiple invocations of stylesheet_pack_tag (eg for a regular stylesheet & a print stylesheet). PR 82 by jdelStrother.
- Tweak swc config for parity with Babel. PR 79 by dleavitt.
v6.1.1 - February 6, 2022
v6.1.0 - February 4, 2022
- Static asset subdirectories are retained after compilation, matching Webpacker v5 behaviour. PR 47 by tomdracz. Fixes issues rails/webpacker#2956 which broke in rails/webpacker#2802.
v6.0.2 - January 25, 2022
- Fix incorrect command name in warning. PR 33 by tricknotes.
v6.0.1 - January 24, 2022
- PR #21 removed pnp-webpack-plugin as a dev dependency but did not remove it from the peer dependency list. PR 30 by t27duck.
v6.0.0 changes from v6.0.0.rc.6 - January 22, 2022
- Raise on multiple invocations of javascript_pack_tag and stylesheet_pack_tag helpers. PR 19 by tomdracz.
- Remove automatic addition of node_modules into rails asset load path. PR 20 by tomdracz.
- Remove pnp-webpack-plugin. PR 21 by tomdracz.
- Make watched_files_digest thread safe. rails/webpacker #3233
- Use single webpack config webpack.config.js. rails/webpacker #3240
- Switch to peer dependencies. rails/webpacker #3234
- Single default configuration file of
config/webpack/webpack.config.js
. Previously, the config file was set toconfig/webpack/#{NODE_ENV}.js
. - Changed all package.json dependencies to peerDependencies, so upgrading requires adding the dependencies, per the UPGRADE GUIDE.
v6.0.0.rc.6 changes from v5.4 - Forked January 16, 2022
-
node_modules
will no longer be babel transfomed compiled by default. This primarily fixes rails issue #35501 as well as numerous other webpacker issues. The disabled loader can still be required explicitly via:const nodeModules = require('@rails/webpacker/rules/node_modules.js') environment.loaders.append('nodeModules', nodeModules)
-
If you have added
environment.loaders.delete('nodeModules')
to yourenvironment.js
, this must be removed or you will receive an error (Item nodeModules not found
). -
extract_css
option was removed. Webpacker will generate a separateapplication.css
file for the defaultapplication
pack, as supported by multiple files per entry introduced in 5.0.0. #2608. However, CSS will be inlined when the webpack-dev-server is used withhmr: true
. JS package exportsinliningCss
. This is useful to enable HMR for React. -
Webpacker's wrapper to the
splitChunks()
API will now defaultruntimeChunk: 'single'
which will help prevent potential issues when using multiple entry points per page #2708. -
Changes
@babel/preset-env
modules option to'auto'
per recommendation in the Babel docs #2709 -
Adds experimental Yarn 2 support. Note you must manually set
nodeLinker: node-modules
in your.yarnrc.yml
. -
Fixes dev server issues #2898
-
Update static files path to from
media/
tostatic/
. -
Deprecated configuration option
watched_paths
. Useadditional_paths
instead inwebpacker.yml
.
- Renamed
/bin/webpack
to/bin/webpacker
and/bin/webpack-dev-server
tobin/webpacker-dev-server
to avoid confusion with underlying webpack executables. - Removed integration installers
- Splitchunks enabled by default
- CSS extraction enabled by default, except when devServer is configured and running