All Versions
Latest Version
Avg Release Cycle
40 days
Latest Release
750 days ago

Changelog History
Page 5

  • v3.2.0 Changes

    December 16, 2017

    โฌ†๏ธ To upgrade:

    bundle update webpacker
    yarn upgrade @rails/webpacker

    ๐Ÿ’ฅ Breaking changes

    If you are using react, vue, angular, elm, erb or coffeescript inside your packs/ please re-run the integration installers as described in the README.

    bundle exec rails webpacker:install:react
    bundle exec rails webpacker:install:vue
    bundle exec rails webpacker:install:angular
    bundle exec rails webpacker:install:elm
    bundle exec rails webpacker:install:erb
    bundle exec rails webpacker:install:coffee

    Or simply copy required loaders used in your app from ๐Ÿš… into your config/webpack/loaders/ ๐Ÿ— directory and add it to webpack build from config/webpack/environment.js

    const erb =  require('./loaders/erb')
    const elm =  require('./loaders/elm')
    const typescript =  require('./loaders/typescript')
    const vue =  require('./loaders/vue')
    const coffee =  require('./loaders/coffee')
    environment.loaders.append('coffee', coffee)
    environment.loaders.append('vue', vue)
    environment.loaders.append('typescript', typescript)
    environment.loaders.append('elm', elm)
    environment.loaders.append('erb', erb)

    ๐Ÿ”Œ In .postcssrc.yml you need to change the plugin name from postcss-smart-import to postcss-import:

      postcss-import: {}
      postcss-cssnext: {}

    โž• Added (npm module)

    • โฌ†๏ธ Upgrade gems and webpack dependencies

    • postcss-import in place of postcss-smart-import

    โœ‚ Removed (npm module)

    • ๐Ÿš… postcss-smart-import, coffee-loader, url-loader, rails-erb-loader as dependencies

    • ๐Ÿš… publicPath from file loader #1107

    ๐Ÿ›  Fixed (npm module)

    • ๐Ÿš… Return native array type for ConfigList #1098

    โž• Added (Gem)

    • New asset_pack_url helper #1102

    • ๐Ÿ†• New installers for coffee and erb

    bundle exec rails webpacker:install:erb
    bundle exec rails webpacker:install:coffee
    • Resolved paths from webpacker.yml to compiler watched list
  • v3.1.1 Changes

    December 11, 2017

    ๐Ÿ›  Fixed

    • ๐Ÿ“ฆ Include default webpacker.yml config inside npm package
  • v3.1.0 Changes

    December 11, 2017

    โž• Added (npm module)

    • ๐Ÿ”ฆ Expose base config from environment
    environment.config.set('resolve.extensions', ['.foo', '.bar'])
    environment.config.set('output.filename', '[name].js')
      output: {
        filename: '[name].js'
    • ๐Ÿ”ฆ Expose new API's for loaders and plugins to insert at position
    const jsonLoader = {
      test: /\.json$/,
      exclude: /node_modules/,
      loader: 'json-loader'
    environment.loaders.append('json', jsonLoader)
    environment.loaders.prepend('json', jsonLoader)
    environment.loaders.insert('json', jsonLoader, { after: 'style' })
    environment.loaders.insert('json', jsonLoader, { before: 'babel' })
    // Update a plugin
    const manifestPlugin = environment.plugins.get('Manifest')
    manifestPlugin.opts.writeToFileEmit = false
    // Update coffee loader to use coffeescript 2
    const babelLoader = environment.loaders.get('babel')
        test: /\.coffee(\.erb)?$/,
        use: babelLoader.use.concat(['coffee-loader'])
      { before: 'json' }
    • ๐Ÿ”ฆ Expose resolve.modules paths like loaders and plugins
    environment.resolvedModules.append('vendor', 'vendor')
    • ๐Ÿ’… Enable sourcemaps in style and css loader

    • ๐Ÿ’… Separate css and sass loader for easier configuration. style loader is now css loader, which resolves .css files and sass loader resolves .scss and .sass files.

    // Enable css modules with sass loader
    const sassLoader = environment.loaders.get('sass')
    const cssLoader = sassLoader.use.find(
      (loader) => loader.loader === 'css-loader'
    cssLoader.options = Object.assign({}, cssLoader.options, {
      modules: true,
      localIdentName: '[path][name]__[local]--[hash:base64:5]'
    • ๐Ÿ”ฆ Expose rest of configurable dev server options from webpacker.yml
    quiet: false
      'Access-Control-Allow-Origin': '*'
      ignored: /node_modules/
    • pretty option to disable/enable color and progress output when running dev server
      pretty: false
    • Enforce deterministic loader order in desc order, starts processing from top to bottom

    • ๐Ÿ”Œ Enforce the entire path of all required modules match the exact case of the actual path on disk using case sensitive paths plugin.

    • โž• Add url loader to process and embed smaller static files

    โœ‚ Removed

    • ๐Ÿš… resolve url loader #1042

    โž• Added (Gem)

    • ๐Ÿ‘ Allow skipping webpacker compile using an env variable
    WEBPACKER_PRECOMPILE=false bundle exec rails assets:precompile

    • ๐Ÿฑ Alias webpacker:compile task to assets:precompile if is not defined so it works without sprockets

  • v3.0.2 Changes

    October 04, 2017

    โž• Added

    • ๐Ÿ‘ Allow dev server connect timeout (in seconds) to be configurable, default: 0.01
  • v3.0.1 Changes

    September 01, 2017

    ๐Ÿ›  Fixed

    • Missing node_modules/.bin/* files by bumping minimum Yarn version to 0.25.2 #727

    • ๐Ÿš… webpacker:compile task so that fails properly when webpack compilation fails #728

    • Rack dev server proxy middleware when served under another proxy (example: pow), which uses HTTP_X_FORWARDED_HOST header resulting in 404 for webpacker assets

    • ๐Ÿš… Make sure tagged logger works with rails < 5 #716

    โž• Added

    • ๐Ÿ‘ Allow webpack dev server listen host/ip to be configurable using additional --listen-host option
      ./bin/webpack-dev-server --listen-host --host localhost

    โœ‚ Removed

    • watchContentBase from devServer config so it doesn't unncessarily trigger live reload when manifest changes. If you have applied this workaround from #724, please revert the change from config/webpack/development.js since this is now fixed.
  • v3.0.0 Changes

    August 30, 2017

    โž• Added

    • resolved_paths option to allow adding additional paths webpack should lookup when resolving modules
      # config/webpacker.yml
      # Additional paths webpack should lookup modules
      resolved_paths: [] # empty by default
    • Webpacker::Compiler.fresh? and Webpacker::Compiler.stale? answer the question of whether compilation is needed. The old Webpacker::Compiler.compile? predicate is deprecated.

    • Dev server config class that exposes config options through singleton.

    • Rack middleware proxies webpacker requests to dev server so we can always serve from same-origin and the lookup works out of the box - no more paths prefixing

    • env attribute on Webpacker::Compiler allows setting custom environment variables that the compilation is being run with

      Webpacker::Compiler.env['FRONTEND_API_KEY'] = 'your_secret_key'

    ๐Ÿ’ฅ Breaking changes

    Note: requires running bundle exec rails webpacker:install


    • โฌ†๏ธ The majority of this config moved to the @rails/webpacker npm package. webpacker:install only creates config/webpack/{environment,development,test,production}.js now so if you're upgrading from a previous version you can remove all other files.


    • ๐Ÿšš Move dev-server config options under defaults so it's transparently available in all environments

    • โž• Add new HMR option for hot-module-replacement

    • โž• Add HTTPS

    โœ‚ Removed

    • Host info from manifest.json, now looks like this:
        "hello_react.js": "/packs/hello_react.js"

    ๐Ÿ›  Fixed

    • Update to respect RAILS_ENV and NODE_ENV values #502
    • 0๏ธโƒฃ Use as default listen address for webpack-dev-server
    • ๐Ÿฑ Serve assets using localhost from dev server - #424
        host: localhost
    • ๐Ÿ On Windows, ruby bin/webpacker and ruby bin/webpacker-dev-server will now bypass yarn, and execute via node_modules/.bin directly - #584

    ๐Ÿ’ฅ Breaking changes

    • โž• Add compile and cache_path options to config/webpacker.yml for configuring lazy compilation of packs when a file under tracked paths is changed #503. To enable expected behavior, update config/webpacker.yml:
        default: &default
          cache_path: tmp/cache/webpacker
          compile: true
          compile: true
          compile: false
    • ๐Ÿ”ง Make test compilation cacheable and configurable so that the lazy compilation only triggers if files are changed under tracked paths. 0๏ธโƒฃ Following paths are watched by default -
        ["app/javascript/**/*", "yarn.lock", "package.json", "config/webpack/**/*"]

    To add more paths:

      # config/initializers/webpacker.rb or config/application.rb
      Webpacker::Compiler.watched_paths << 'bower_components'
  • v2.0 Changes

    May 24, 2017

    ๐Ÿ›  Fixed

    • โšก๏ธ Update .babelrc to fix compilation issues - #306

    • ๐Ÿš… Duplicated asset hosts - #320, #397

    • ๐Ÿš… Missing asset host when defined as a Proc or on ActionController::Base.asset_host directly - #397

    • ๐Ÿš… Incorrect asset host when running webpacker:compile or bin/webpack in development mode - #397

    • โšก๏ธ Update webpacker:compile task to use stdout and stderr for better logging - #395

    • ๐Ÿš… ARGV support for webpack-dev-server - #286

    โž• Added

    • ๐Ÿ‘ Elm support. You can now add Elm support via the following methods:

      • New app: rails new <app> --webpack=elm
      • Within an existing app: rails webpacker:install:elm
    • Support for custom public_output_path paths independent of source_entry_path in config/webpacker.yml. output is also now relative to public/. - #397

    Before (compile to public/packs):

      source_entry_path: packs
      public_output_path: packs

    After (compile to public/sweet/js):

      source_entry_path: packs
      public_output_path: sweet/js
      "presets": [
            "modules": false,
            "targets": {
              "browsers": "> 1%",
              "uglify": true
            "useBuiltIns": true
      "plugins": [
        { "spec": true }
    • ๐Ÿ‘ Source-map support for production bundle

    ๐Ÿ’ฅ Breaking Change

    • ๐Ÿ”ง Consolidate and flatten paths.yml and development.server.yml config into one file - config/webpacker.yml - #403. This is a breaking change and requires you to re-install webpacker and cleanup old configuration files.
      bundle update webpacker
      bundle exec rails webpacker:install
      # Remove old/unused configuration files
      rm config/webpack/paths.yml
      rm config/webpack/development.server.yml
      rm config/webpack/development.server.js

    Warning: For now you also have to add a pattern in .gitignore by hand.

  • v1.2 Changes

    April 27, 2017

    Some of the changes made requires you to run below commands to install new changes.

    bundle update webpacker
    bundle exec rails webpacker:install

    ๐Ÿ›  Fixed

    • ๐Ÿ‘Œ Support Spring - #205
      Spring.after_fork { Webpacker.bootstrap } if defined?(Spring)
    • ๐Ÿš… Check node version and yarn before installing webpacker - #217

    • ๐Ÿš… Include webpacker helper to views - #172

    • ๐Ÿ Webpacker installer on windows - #245

    • ๐Ÿš… Yarn duplication - #278

    • โž• Add back Spring for rails-erb-loader - #216

    • ๐Ÿšš Move babel presets and plugins to .babelrc - #202

    โž• Added

    • ๐Ÿš… A changelog - #211
    • ๐Ÿฑ Minimize CSS assets - #218
    • ๐Ÿš… Pack namespacing support - #201

    For example:

    • โž• Add tree-shaking support - #250
    • โž• Add initial test case by @kimquy #259
    • ๐Ÿฑ Compile assets before test:controllers and test:system

    โœ‚ Removed

    • ๐Ÿš… Webpack watcher - #295
  • v1.1 Changes

    March 24, 2017

    ๐Ÿš€ This release requires you to run below commands to install new features.

    bundle update webpacker
    bundle exec rails webpacker:install