Skip to content

Latest commit

 

History

History
169 lines (120 loc) · 14.4 KB

CHANGELOG.md

File metadata and controls

169 lines (120 loc) · 14.4 KB

Versions

Changes since last non-beta release.

Please add entries here for your pull requests that are not yet released.

  • append_javascript_pack_tag and append_stylesheet_pack_tag helpers return nil to prevent rendering the queue into view when using <%= … %> ERB syntax. PR 167 by ur5us

v6.5.0 - July 4, 2022

Added

  • append_stylesheet_pack_tag helper. It helps in configuring stylesheet pack names from the view for a route or partials. It is also required for filesystem-based automated Component Registry API on React on Rails gem. PR 144 by pulkitkkr.

Improved

v6.4.1 - June 5, 2022

Fixed

  • Restores automatic installation of yarn packages removed in #131, with added deprecation notice. PR 140 by tomdracz.

    This will be again removed in Shakapacker v7 so you need to ensure you are installing yarn packages explicitly before the asset compilation, rather than relying on this behaviour through asset:precompile task (e.g. Capistrano deployment).

  • Disable Spring being used by rails-erb-loader. PR 141 by tomdracz.

v6.4.0 - June 2, 2022

Fixed

Added

  • Configuration boolean option nested_entries to use nested entries. This was the default prior to v6.0. Because entries maybe generated, it's useful to allow a generated subdirectory. PR 121 by justin808.

Improved

  • Allow v10 of compression-webpack-plugin as a peer dependency. PR 117 by aried3r.

  • Remove assets:precompile task enhancement #131 by James Herdman: Removed the yarn:install Rake task, and no longer enhance assets:precompile with said task. These tasks were used to ensure required NPM packages were installed before asset precompilation. Going forward you will need to ensure these packages are already installed yourself. Should you wish to restore this behaviour you'll need to reimplement the task in your own application.

v6.3.0 - May 19, 2022

Improved

  • Add ability to configure usage of either last modified timestamp and digest strategies when checking asset freshness. PR 112 by tomdracz.

Fixed

[v6.3.0-rc.1] - April 24, 2022

Note: Rubygem is 6.3.0.pre.rc.1 and NPM is 6.3.0-rc.1.

Changed

  • Remove Loose mode from the default @babel-preset/env configuration. PR 107 by Jeremy Liberman.

    Loose mode compiles the bundle down to be compatible with ES5, but saves space by skipping over behaviors that are considered edge cases. Loose mode can affect how your code runs in a variety of ways, but in newer versions of Babel it's better to use Compiler Assumptions to have finer-grained control over which edge cases you're choosing to ignore.

    This change may increase the file size of your bundles, and may change some behavior in your app if your code touches upon one of the edge cases where Loose mode differs from native JavaScript. There are notes in the linked PR about how to turn Loose mode back on if you need to, but consider migrating to Compiler Assumptions when you can. If you have already customized your babel config, this change probably won't affect you.

Added

  • Adds webpacker_precompile setting to webpacker.yml to allow controlling precompile behaviour, similar to existing ENV["WEBPACKER_PRECOMPILE"] variable. PR 102 by Judahmeek.
  • Adds append_javascript_pack_tag helper. Allows for easier usage and coordination of multiple javascript packs. PR 94 by tomdracz.

Improved

  • Use last modified timestamps rather than file digest to determine compiler freshness. PR 97 by tomdracz.

    Rather than calculating SHA digest of all the files in the paths watched by the compiler, we are now comparing the modified time of the manifest.json file versus the latest modified timestamp of files and directories in watched paths. Unlike calculating digest, which only looked at the files, the new calculation also considers directory timestamps, including the parent ones (i.e. config.source_path folder timestamp will be checked together will timestamps of all files and directories inside of it).

    This change should result in improved compiler checks performance but might be breaking for certain setups and edge cases. If you encounter any issues, please report them at https://github.com/shakacode/shakapacker/issues.

  • Bump dependency versions in package.json to address security vulnerabilities. PR 109 by tomdracz.

  • Add webpack-dev-server as peerDependency to make its usage clear. PR 109 by tomdracz.

v6.2.1 - April 15, 2022

Fixed

  • Put back config.public_manifest_path, removed in 6.2.0 in PR 78. PR 104 by justin808.

v6.2.0 - March 22, 2022

Added

  • 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.

Improved

  • 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

Added

v6.1.0 - February 4, 2022

Added

Fixed

v6.0.2 - January 25, 2022

Improved

v6.0.1 - January 24, 2022

Improved

  • PR #21 removed pnp-webpack-plugin as a dev dependency but did not remove it from the peer dependency list. PR 30 by t27duck.

Improved

  • 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.

Merged from rails/webpacker

Upgrading from rails/webpacker 6.0.0.rc.6

  • Single default configuration file of config/webpack/webpack.config.js. Previously, the config file was set to config/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 your environment.js, this must be removed or you will receive an error (Item nodeModules not found).

  • extract_css option was removed. Webpacker will generate a separate application.css file for the default application 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 with hmr: true. JS package exports inliningCss. This is useful to enable HMR for React.

  • Webpacker's wrapper to the splitChunks() API will now default runtimeChunk: '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/ to static/.

  • Deprecated configuration option watched_paths. Use additional_paths instead in webpacker.yml.

Breaking changes

  • Renamed /bin/webpack to /bin/webpacker and /bin/webpack-dev-server to bin/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

v5.4.3 and prior changes from rails/webpacker

See CHANGELOG.md in rails/webpacker (up to v5.4.3)