Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rails/webpacker

Package Overview
Dependencies
Maintainers
10
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rails/webpacker - npm Package Versions

1
68

3.4.1

Diff

Changelog

Source

[3.4.1] - 2018-03-24

Fixed

  • Yarn integrity check in development #1374
gauravtiwari
published 3.4.0 •

Changelog

Source

[3.4.0] - 2018-03-23

Please use 3.4.1 instead

Added

  • Support for custom Rails environments #1359

This could break the compilation if you set NODE_ENV to custom environment. Now, NODE_ENV only understands production or development mode

gauravtiwari
published 3.3.1 •

Changelog

Source

[3.3.1] - 2018-03-12

Fixed

  • Use webpack dev server 2.x until webpacker supports webpack 4.x #1338
gauravtiwari
published 3.3.0 •

Changelog

Source

[3.3.0] - 2018-03-03

Added

  • Separate task for installing/updating binstubs
  • CSS modules support #1248
  • Pass relative_url_root to webpacker config #1236

Breaking changes

  • Fixes #1281 by installing binstubs only as local executables. To upgrade:
bundle exec rails webpacker:binstubs
  • set function is now removed from plugins and loaders, please use append or prepend
// config/webpack/environment.js
const { environment } = require('@rails/webpacker')

environment.loaders.append('json', {
  test: /\.json$/,
  use: 'json-loader'
})

Fixed

  • Limit ts-loader to 3.5.0 until webpack 4 support #1308
  • Custom env support #1304
gauravtiwari
published 3.2.2 •

Changelog

Source

[3.2.2] - 2018-02-11

Added

bundle exec rails webpacker:install:stimulus
  • Upgrade gems and npm packages #1254

And, bunch of bug fixes See changes

gauravtiwari
published 3.2.1 •

Changelog

Source

[3.2.1] - 2018-01-21

  • Disable dev server running? check if no dev server config is present in that environment #1179

  • Fix checking 'webpack' binstub on Windows #1123

  • silence yarn output if checking is successful #1131

  • Update uglifyJs plugin to support ES6 #1194

  • Add typescript installer #1145

  • Update default extensions and move to installer #1181

  • Revert file loader #1196

gauravtiwari
published 3.2.0 •

Changelog

Source

[3.2.0] - 2017-12-16

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 https://github.com/rails/webpacker/tree/master/lib/install/loaders 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:

plugins:
  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
gauravtiwari
published 3.1.1 •

Changelog

Source

[3.1.1] - 2017-12-11

Fixed

  • Include default webpacker.yml config inside npm package
gauravtiwari
published 3.1.0 •

Changelog

Source

[3.1.0] - 2017-12-11

Added (npm module)

  • Expose base config from environment
environment.config.set('resolve.extensions', ['.foo', '.bar'])
environment.config.set('output.filename', '[name].js')
environment.config.delete('output.chunkFilename')
environment.config.get('resolve')
environment.config.merge({
  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')
environment.loaders.insert(
  'coffee',
  {
    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
headers:
  'Access-Control-Allow-Origin': '*'
watch_options:
  ignored: /node_modules/
  • pretty option to disable/enable color and progress output when running dev server
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

Added (Gem)

  • Allow skipping webpacker compile using an env variable
WEBPACKER_PRECOMPILE=no|false|n|f
WEBPACKER_PRECOMPILE=false bundle exec rails assets:precompile
  • Use WEBPACKER_ASSET_HOST instead of ASSET_HOST for CDN

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

javan
published 3.0.2 •

Changelog

Source

[3.0.2] - 2017-10-04

Added

  • Allow dev server connect timeout (in seconds) to be configurable, default: 0.01
# Change to 1s
Webpacker.dev_server.connect_timeout = 1
  • Restrict the source maps generated in production #770

  • Binstubs #833

  • Allow dev server settings to be overridden by env variables #843

  • A new lookup method to manifest to perform lookup without raise and return nil

Webpacker.manifest.lookup('foo.js')
# => nil
Webpacker.manifest.lookup!('foo.js')
# => raises Webpacker::Manifest::MissingEntryError
  • Catch all exceptions in DevServer.running? and return false #878

Removed

  • Inline CLI args for dev server binstub, use env variables instead

  • Coffeescript as core dependency. You have to manually add coffeescript now, if you are using it in your app.

yarn add coffeescript@1.12.7

# OR coffeescript 2.0
yarn add coffeescript
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc