{"bugs":{"url":"https://github.com/rails/webpacker/issues"},"dist":{"shasum":"04af15dc33697e09aa492da54d2093cdd15573ff","tarball":"https://registry.npmjs.org/@rails/webpacker/-/webpacker-6.0.0-rc.6.tgz","fileCount":35,"integrity":"sha512-nbDxn3KsSoLeJgVpU3J81wiXLg4vErEahWdi08BJx5EO9aS6+mXWhOXHKyQogCxLkBMvLZqOafUnJMcK9O+9sA==","signatures":[{"sig":"MEYCIQCswy3WPC5ehGJL0pPVqE2XE5K3bRHQGoY4rsEFfA5ySQIhAPOej/E3P+6OkgWg8wcuiIT5i2YTCRtvAPu8449DOROY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54755},"jest":{"roots":["<rootDir>/package"],"testRegex":"(/__tests__/.*|(\\.|/))\\.jsx?$"},"main":"package/index.js","name":"@rails/webpacker","author":{"name":"David Heinemeier Hansson","email":"david@basecamp.com"},"readme":"# Webpacker\n\n[![Ruby specs](https://github.com/rails/webpacker/workflows/Ruby%20specs/badge.svg)](https://github.com/rails/webpacker/actions)\n[![Jest specs](https://github.com/rails/webpacker/workflows/Jest%20specs/badge.svg)](https://github.com/rails/webpacker/actions)\n[![Rubocop](https://github.com/rails/webpacker/workflows/Rubocop/badge.svg)](https://github.com/rails/webpacker/actions)\n[![JS lint](https://github.com/rails/webpacker/workflows/JS%20lint/badge.svg)](https://github.com/rails/webpacker/actions)\n\n[![node.js](https://img.shields.io/badge/node-%3E%3D%2012.0.0-brightgreen.svg)](https://www.npmjs.com/package/@rails/webpacker)\n[![Gem](https://img.shields.io/gem/v/webpacker.svg)](https://rubygems.org/gems/webpacker)\n\nWebpacker makes it easy to use the JavaScript pre-processor and bundler\n[Webpack v5](https://webpack.js.org/)\nto manage application-like JavaScript in Rails. It can coexist with the asset pipeline,\nleaving Webpack responsible solely for app-like JavaScript, or it can be used exclusively, making it also responsible for images, fonts, and CSS.\n\n**NOTE:** The master branch now hosts the code for v6.x.x. Please refer to [5-x-stable](https://github.com/rails/webpacker/tree/5-x-stable) branch for 5.x documentation.\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Features](#features)\n  - [Optional support](#optional-support)\n- [Installation](#installation)\n  - [Usage](#usage)\n    - [Server-Side Rendering (SSR)](#server-side-rendering-ssr)\n  - [Development](#development)\n  - [Webpack Configuration](#webpack-configuration)\n  - [Babel Configuration](#babel-configuration)\n  - [Integrations](#integrations)\n    - [React](#react)\n    - [CoffeeScript](#coffeescript)\n    - [TypeScript](#typescript)\n    - [CSS](#css)\n    - [Postcss](#postcss)\n    - [Sass](#sass)\n    - [Less](#less)\n    - [Stylus](#stylus)\n    - [Other frameworks](#other-frameworks)\n  - [Custom Rails environments](#custom-rails-environments)\n  - [Upgrading](#upgrading)\n- [Paths](#paths)\n  - [Additional paths](#additional-paths)\n- [Deployment](#deployment)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Prerequisites\n\n- Ruby 2.4+\n- Rails 5.2+\n- Node.js 12.13.0+ || 14+\n- Yarn\n\n## Features\n\n- [Webpack v5](https://webpack.js.org/)\n- ES6 with [babel](https://babeljs.io/)\n- Automatic code splitting using multiple entry points\n- Asset compression, source-maps, and minification\n- CDN support\n- Rails view helpers\n- Extensible and configurable\n\n### Optional support\n\n  _requires extra packages to be installed_\n\n  - Stylesheets - Sass, Less, Stylus and Css, PostCSS\n  - CoffeeScript\n  - TypeScript\n  - React\n\n## Installation\n\nYou can configure a new Rails application with Webpacker right from the start using the `-j webpack` option:\n\n```bash\nrails new myapp -j webpack\n```\n\nOr you can add it later by changing your `Gemfile`:\n\n```ruby\n# Gemfile\ngem 'webpacker', '~> 6.0'\n\n# OR if you prefer to use master\ngem 'webpacker', git: 'https://github.com/rails/webpacker.git'\nyarn add https://github.com/rails/webpacker.git\n```\n\nThen running the following to install Webpacker:\n\n```bash\n./bin/bundle install\n./bin/rails webpacker:install\n```\n\nWhen `package.json` and/or `yarn.lock` changes, such as when pulling down changes to your local environment in a team settings, be sure to keep your NPM packages up-to-date:\n\n```bash\nyarn install\n```\n\n### Usage\n\nOnce installed, you can start writing modern ES6-flavored JavaScript apps right away:\n\n```yml\napp/javascript:\n  # Only Webpack entry files here\n  └── application.js\n  └── application.css\n  └── src:\n  │   └── my_component.js\n  └── stylesheets:\n  │   └── my_styles.css\n  └── images:\n      └── logo.svg\n```\n\nYou can then link the JavaScript pack in Rails views using the `javascript_pack_tag` helper. If you have styles imported in your pack file, you can link them by using `stylesheet_pack_tag`:\n\n```erb\n<%= javascript_pack_tag 'application' %>\n<%= stylesheet_pack_tag 'application' %>\n```\n\nThe `javascript_pack_tag` and `stylesheet_pack_tag` helpers will include all the transpiled\npacks with the chunks in your view, which creates html tags for all the chunks.\n\nThe result looks like this:\n\n```erb\n<%= javascript_pack_tag 'calendar', 'map', 'data-turbolinks-track': 'reload' %>\n\n<script src=\"/packs/vendor-16838bab065ae1e314.js\" data-turbolinks-track=\"reload\" defer></script>\n<script src=\"/packs/calendar~runtime-16838bab065ae1e314.js\" data-turbolinks-track=\"reload\" defer></script>\n<script src=\"/packs/calendar-1016838bab065ae1e314.js\" data-turbolinks-track=\"reload\" defer\"></script>\n<script src=\"/packs/map~runtime-16838bab065ae1e314.js\" data-turbolinks-track=\"reload\" defer></script>\n<script src=\"/packs/map-16838bab065ae1e314.js\" data-turbolinks-track=\"reload\" defer></script>\n```\n\n**Important:** Pass all your pack names as multiple arguments, not multiple calls, when using `javascript_pack_tag` and the **`stylesheet_pack_tag`. Otherwise, you will get duplicated chunks on the page. Be especially careful if you might be calling these view helpers from your view, partials, and the layout for a page. You will need some logic to ensure you call the helpers only once with multiple arguments.\n\n```erb\n<%# DO %>\n<%= javascript_pack_tag 'calendar', 'map' %>\n<%= stylesheet_pack_tag 'calendar', 'map' %>\n\n<%# DON'T %>\n<%= javascript_pack_tag 'calendar' %>\n<%= javascript_pack_tag 'map' %>\n<%= stylesheet_pack_tag 'calendar' %>\n<%= stylesheet_pack_tag 'map' %>\n```\n\nIf you want to link a static asset for `<img />` tag, you can use the `asset_pack_path` helper:\n```erb\n<img src=\"<%= asset_pack_path 'images/logo.svg' %>\" />\n```\n\nOr use the dedicated helper:\n```erb\n<%= image_pack_tag 'application.png', size: '16x10', alt: 'Edit Entry' %>\n<%= image_pack_tag 'picture.png', srcset: { 'picture-2x.png' => '2x' } %>\n```\n\nIf you want to create a favicon:\n```erb\n<%= favicon_pack_tag 'mb-icon.png', rel: 'apple-touch-icon', type: 'image/png' %>\n```\n\nIf you want to preload a static asset in your `<head>`, you can use the `preload_pack_asset` helper:\n```erb\n<%= preload_pack_asset 'fonts/fa-regular-400.woff2' %>\n```\n\nIf you want to use images in your stylesheets:\n\n```css\n.foo {\n  background-image: url('../images/logo.svg')\n}\n```\n##### Defer for `javascript_pack_tag`\nNote, the default of \"defer\" for the `javascript_pack_tag`. You can override that to `false`. If you expose jquery globally with `expose-loader,` by using `import $ from \"expose-loader?exposes=$,jQuery!jquery\"` in your `app/packs/entrypoints/application.js`, pass the option `defer: false` to your `javascript_pack_tag`.\n\n#### Server-Side Rendering (SSR)\n\nNote, if you are using server-side rendering of JavaScript with dynamic code-splitting, as is often done with extensions to Webpacker, like [React on Rails](https://github.com/shakacode/react_on_rails), your JavaScript should create the link prefetch HTML tags that you will use, so you won't need to use to `asset_pack_path` in those circumstances.\n\n**Note:** In order for your styles or static assets files to be available in your view, you would need to link them in your \"pack\" or entry file. Otherwise, Webpack won't know to package up those files.\n\n### Development\n\nWebpacker ships with two binstubs: `./bin/webpack` and `./bin/webpack-dev-server`. Both are thin wrappers around the standard `webpack.js` and `webpack-dev-server.js` executables to ensure that the right configuration files and environmental variables are loaded based on your environment.\n\nIn development, Webpacker compiles on demand rather than upfront by default. This happens when you refer to any of the pack assets using the Webpacker helper methods. This means that you don't have to run any separate processes. Compilation errors are logged to the standard Rails log. However, this auto-compilation happens when a web request is made that requires an updated webpack build, not when files change. Thus, that can be painfully slow for front-end development in this default way. Instead, you should either run the `bin/webpack --watch` or run `./bin/webpack-dev-server`\n\nIf you want to use live code reloading, or you have enough JavaScript that on-demand compilation is too slow, you'll need to run `./bin/webpack-dev-server` or `ruby ./bin/webpack-dev-server`. Windows users will need to run these commands in a terminal separate from `bundle exec rails s`. This process will watch for changes in the relevant files, defined by `webpacker.yml` configuration settings for `source_path`, `source_entry_path`, and `additional_paths`, and it will then automatically reload the browser to match. This feature is also known as [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/).\n\n```bash\n# webpack dev server\n./bin/webpack-dev-server\n\n# watcher\n./bin/webpack --watch --progress\n\n# standalone build\n./bin/webpack --progress\n\n# Help\n./bin/webpack help\n\n# Version\n./bin/webpack version\n\n# Info\n./bin/webpack info\n```\n\nOnce you start this webpack development server, Webpacker will automatically start proxying all webpack asset requests to this server. When you stop this server, Rails will detect that it's not running and Rails will revert back to on-demand compilation _if_ you have the `compile` option set to true in your `config/webpacker.yml`\n\nYou can use environment variables as options supported by [webpack-dev-server](https://webpack.js.org/configuration/dev-server/) in the form `WEBPACKER_DEV_SERVER_<OPTION>`. Please note that these environmental variables will always take precedence over the ones already set in the configuration file, and that the _same_ environmental variables must be available to the `rails server` process.\n\n```bash\nWEBPACKER_DEV_SERVER_HOST=example.com WEBPACKER_DEV_SERVER_INLINE=true WEBPACKER_DEV_SERVER_HOT=false ./bin/webpack-dev-server\n```\n\nBy default, the webpack dev server listens on `localhost` in development for security purposes. However, if you want your app to be available over local LAN IP or a VM instance like vagrant, you can set the `host` when running `./bin/webpack-dev-server` binstub:\n\n```bash\nWEBPACKER_DEV_SERVER_HOST=0.0.0.0 ./bin/webpack-dev-server\n```\n\n**Note:** You need to allow webpack-dev-server host as an allowed origin for `connect-src` if you are running your application in a restrict CSP environment (like Rails 5.2+). This can be done in Rails 5.2+ in the CSP initializer `config/initializers/content_security_policy.rb` with a snippet like this:\n\n```ruby\nRails.application.config.content_security_policy do |policy|\n  policy.connect_src :self, :https, 'http://localhost:3035', 'ws://localhost:3035' if Rails.env.development?\nend\n```\n\n**Note:** Don't forget to prefix `ruby` when running these binstubs on Windows\n\n\n### Webpack Configuration\n\nWebpacker gives you a default set of configuration files for test, development and production environments in `config/webpack/*.js`. You can configure each individual environment in their respective files or configure them all in the base\n`config/webpack/base.js` file.\n\nBy default, you don't need to make any changes to `config/webpack/*.js` files since it's all standard production-ready configuration. However, if you do need to customize or add a new loader, this is where you would go.\n\nHere is how you can modify webpack configuration:\n\nYou might add separate files to keep your code more organized.\n\n```js\n// config/webpack/custom.js\nmodule.exports = {\n  resolve: {\n    alias: {\n      jquery: 'jquery/src/jquery',\n      vue: 'vue/dist/vue.js',\n      React: 'react',\n      ReactDOM: 'react-dom',\n      vue_resource: 'vue-resource/dist/vue-resource'\n    }\n  }\n}\n```\n\nThen `require` this file in your `config/webpack/base.js`:\n\n```js\n// config/webpack/base.js\nconst { webpackConfig, merge } = require('@rails/webpacker')\nconst customConfig = require('./custom')\n\nmodule.exports = merge(webpackConfig, customConfig)\n```\n\nIf you need access to configs within Webpacker's configuration, you can import them like so:\n\n```js\n// config/webpack/base.js\nconst { webpackConfig } = require('@rails/webpacker')\n\nconsole.log(webpackConfig.output_path)\nconsole.log(webpackConfig.source_path)\n\n// Or to print out your whole webpack configuration\nconsole.log(JSON.stringify(webpackConfig, undefined, 2))\n```\n\n### Babel configuration\n\nBy default, you will find the Webpacker preset in your `package.json`.\n\n```json\n\"babel\": {\n  \"presets\": [\n    \"./node_modules/@rails/webpacker/package/babel/preset.js\"\n  ]\n},\n```\n\nOptionally, you can change your Babel configuration by removing these lines in your `package.json` and add [a Babel configuration file](https://babeljs.io/docs/en/config-files) in your project.\n\n\n### Integrations\n\nWebpacker out of the box supports JS and static assets (fonts, images etc.) compilation. To enable support for CoffeeScript or TypeScript install relevant packages:\n\n#### React\n\n```bash\nyarn add react react-dom @babel/preset-react\n```\n\n...if you are using typescript, update your `tsconfig.json`\n\n```json\n{\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"lib\": [\"es6\", \"dom\"],\n    \"module\": \"es6\",\n    \"moduleResolution\": \"node\",\n    \"sourceMap\": true,\n    \"target\": \"es5\",\n    \"jsx\": \"react\",\n    \"noEmit\": true\n  },\n  \"exclude\": [\"**/*.spec.ts\", \"node_modules\", \"vendor\", \"public\"],\n  \"compileOnSave\": false\n}\n```\n\n#### CoffeeScript\n\n```bash\nyarn add coffeescript coffee-loader\n```\n\n#### TypeScript\n\n```bash\nyarn add typescript @babel/preset-typescript\n```\n\nBabel won’t perform any type-checking on TypeScript code. To optionally use type-checking run:\n\n```bash\nyarn add fork-ts-checker-webpack-plugin\n```\n\nAdd tsconfig.json\n\n```json\n{\n  \"compilerOptions\": {\n    \"declaration\": false,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"lib\": [\"es6\", \"dom\"],\n    \"module\": \"es6\",\n    \"moduleResolution\": \"node\",\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"*\": [\"node_modules/*\", \"app/packs/*\"]\n    },\n    \"sourceMap\": true,\n    \"target\": \"es5\",\n    \"noEmit\": true\n  },\n  \"exclude\": [\"**/*.spec.ts\", \"node_modules\", \"vendor\", \"public\"],\n  \"compileOnSave\": false\n}\n```\n\nThen modify the webpack config to use it as a plugin:\n\n```js\n// config/webpack/base.js\nconst { webpackConfig, merge } = require(\"@rails/webpacker\");\nconst ForkTSCheckerWebpackPlugin = require(\"fork-ts-checker-webpack-plugin\");\n\nmodule.exports = merge(webpackConfig, {\n  plugins: [new ForkTSCheckerWebpackPlugin()],\n});\n```\n\n#### CSS\n\nTo enable CSS support in your application, add following packages:\n\n```bash\nyarn add css-loader style-loader mini-css-extract-plugin css-minimizer-webpack-plugin\n```\n\nOptionally, add the `CSS` extension to webpack config for easy resolution.\n\n```js\n// config/webpack/base.js\nconst { webpackConfig, merge } = require('@rails/webpacker')\nconst customConfig = {\n  resolve: {\n    extensions: ['.css']\n  }\n}\n\nmodule.exports = merge(webpackConfig, customConfig)\n```\n\nTo enable `PostCSS`, `Sass` or `Less` support, add `CSS` support first and\nthen add the relevant pre-processors:\n\n#### Postcss\n\n```bash\nyarn add postcss postcss-loader\n```\n\nOptionally add these two plugins if they are required in your `postcss.config.js`:\n```bash\nyarn add postcss-preset-env postcss-flexbugs-fixes\n```\n\n#### Sass\n\n```bash\nyarn add sass sass-loader\n```\n\n#### Less\n\n```bash\nyarn add less less-loader\n```\n\n#### Stylus\n\n```bash\nyarn add stylus stylus-loader\n```\n\n#### Other frameworks\n\nPlease follow webpack integration guide for relevant framework or library,\n\n1. [Svelte](https://github.com/sveltejs/svelte-loader#install)\n2. [Angular](https://v2.angular.io/docs/ts/latest/guide/webpack.html#!#configure-webpack)\n3. [Vue](https://vue-loader.vuejs.org/guide/)\n\nFor example to add Vue support:\n```js\n// config/webpack/rules/vue.js\nconst { VueLoaderPlugin } = require('vue-loader')\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.vue$/,\n        loader: 'vue-loader'\n      }\n    ]\n  },\n  plugins: [new VueLoaderPlugin()],\n  resolve: {\n    extensions: ['.vue']\n  }\n}\n```\n\n```js\n// config/webpack/base.js\nconst { webpackConfig, merge } = require('@rails/webpacker')\nconst vueConfig = require('./rules/vue')\n\nmodule.exports = merge(vueConfig, webpackConfig)\n```\n\n\n### Custom Rails environments\n\nOut of the box Webpacker ships with - development, test and production environments in `config/webpacker.yml` however, in most production apps extra environments are needed as part of deployment workflow. Webpacker supports this out of the box from version 3.4.0+ onwards.\n\nYou can choose to define additional environment configurations in webpacker.yml,\n\n```yml\nstaging:\n  <<: *default\n\n  # Production depends on precompilation of packs prior to booting for performance.\n  compile: false\n\n  # Cache manifest.json for performance\n  cache_manifest: true\n\n  # Compile staging packs to a separate directory\n  public_output_path: packs-staging\n```\n\nOtherwise Webpacker will use production environment as a fallback environment for loading configurations. Please note, `NODE_ENV` can either be set to `production`, `development` or `test`. This means you don't need to create additional environment files inside `config/webpacker/*` and instead use webpacker.yml to load different configurations using `RAILS_ENV`.\n\nFor example, the below command will compile assets in production mode but will use staging configurations from `config/webpacker.yml` if available or use fallback production environment configuration:\n\n```bash\nRAILS_ENV=staging bundle exec rails assets:precompile\n```\n\nAnd, this will compile in development mode and load configuration for cucumber environment if defined in webpacker.yml or fallback to production configuration\n\n```bash\nRAILS_ENV=cucumber NODE_ENV=development bundle exec rails assets:precompile\n```\n\nPlease note, binstubs compiles in development mode however rake tasks compiles in production mode.\n\n```bash\n# Compiles in development mode unless NODE_ENV is specified, per the binstub source\n./bin/webpack\n./bin/webpack-dev-server\n\n# Compiles in production mode by default unless NODE_ENV is specified, per `lib/tasks/webpacker/compile.rake`\nbundle exec rails assets:precompile\nbundle exec rails webpacker:compile\n```\n\n### Upgrading\n\nYou can run following commands to upgrade Webpacker to the latest stable version. This process involves upgrading the gem and related JavaScript packages:\n\n```bash\n# check your Gemfile for version restrictions\nbundle update webpacker\n\n# overwrite your changes to the default install files and revert any unwanted changes from the install\nrails webpacker:install\n\n# yarn 1 instructions\nyarn upgrade @rails/webpacker --latest\nyarn upgrade webpack-dev-server --latest\n\n# yarn 2 instructions\nyarn up @rails/webpacker@latest\nyarn up webpack-dev-server@latest\n\n# Or to install the latest release (including pre-releases)\nyarn add @rails/webpacker@next\n```\n\nAlso, consult the [CHANGELOG](./CHANGELOG.md) for additional upgrade links.\n\n## Paths\n\nBy default, Webpacker ships with simple conventions for where the JavaScript app files and compiled webpack bundles will go in your Rails app. All these options are configurable from `config/webpacker.yml` file.\n\nThe configuration for what webpack is supposed to compile by default rests on the convention that every file in `app/packs/entrypoints/*`**(default)** or whatever path you set for `source_entry_path` in the `webpacker.yml` configuration is turned into their own output files (or entry points, as webpack calls it). Therefore you don't want to put anything inside `packs` directory that you do not want to be an entry file. As a rule of thumb, put all files you want to link in your views inside \"packs\" directory and keep everything else under `app/packs`.\n\nSuppose you want to change the source directory from `app/packs` to `frontend` and output to `assets/packs`. This is how you would do it:\n\n```yml\n# config/webpacker.yml\nsource_path: frontend # packs are in frontend/packs\npublic_output_path: assets/packs # outputs to => public/assets/packs\n```\n\nSimilarly you can also control and configure `webpack-dev-server` settings from `config/webpacker.yml` file:\n\n```yml\n# config/webpacker.yml\ndevelopment:\n  dev_server:\n    host: localhost\n    port: 3035\n```\n\nIf you have `hmr` turned to true, then the `stylesheet_pack_tag` generates no output, as you will want to configure your styles to be inlined in your JavaScript for hot reloading. During production and testing, the `stylesheet_pack_tag` will create the appropriate HTML tags.\n\n### Additional paths\n\nIf you are adding Webpacker to an existing app that has most of the assets inside `app/assets` or inside an engine, and you want to share that with webpack modules, you can use the `additional_paths` option available in `config/webpacker.yml`. This lets you\nadd additional paths that webpack should look up when resolving modules:\n\n```yml\nadditional_paths: ['app/assets', 'vendor/assets']\n```\n\nYou can then import these items inside your modules like so:\n\n```js\n// Note it's relative to parent directory i.e. app/assets\nimport 'stylesheets/main'\nimport 'images/rails.png'\n```\n\n**Note:** Please be careful when adding paths here otherwise it will make the compilation slow, consider adding specific paths instead of whole parent directory if you just need to reference one or two modules\n\n**Also note:** While importing assets living outside your `source_path` defined in webpacker.yml (like, for instance, assets under `app/assets`) from within your packs using _relative_ paths like `import '../../assets/javascripts/file.js'` will work in development, Webpacker won't recompile the bundle in production unless a file that lives in one of it's watched paths has changed (check out `Webpacker::Compiler#watched_files_digest`). That's why you'd need to add `app/assets` to the additional_paths as stated above and use `import 'javascripts/file.js'` instead.\n\n\n## Deployment\n\nWebpacker hooks up a new `webpacker:compile` task to `assets:precompile`, which gets run whenever you run `assets:precompile`. If you are not using Sprockets, `webpacker:compile` is automatically aliased to `assets:precompile`. Similar to sprockets both rake tasks will compile packs in production mode but will use `RAILS_ENV` to load configuration from `config/webpacker.yml` (if available).\n\nWhen compiling assets for production on a remote server, such as a continuous integration environment, it's recommended to use `yarn install --frozen-lockfile` to install NPM packages on the remote host to ensure that the installed packages match the `yarn.lock` file.\n\nIf you are using a CDN setup, webpacker will use the configured [asset host](https://guides.rubyonrails.org/configuring.html#rails-general-configuration) value to prefix URLs for images or font icons which are included inside JS code or CSS. It is possible to override this value during asset compilation by setting the `WEBPACKER_ASSET_HOST` environment variable.\n\n\n## Troubleshooting\n\nSee the doc page for [Troubleshooting](./docs/troubleshooting.md).\n\n\n## Contributing\n\n[![Code Helpers](https://www.codetriage.com/rails/webpacker/badges/users.svg)](https://www.codetriage.com/rails/webpacker)\n\nWe encourage you to contribute to Webpacker! See [CONTRIBUTING](CONTRIBUTING.md) for guidelines about how to proceed.\n\n\n## License\n\nWebpacker is released under the [MIT License](https://opensource.org/licenses/MIT).\n","engines":{"node":">= 12.13.0 || >=14","yarn":">=1 <4"},"gitHead":"a51bf1ff469f3b88a794b0f00732364d5dd506e6","license":"MIT","scripts":{"lint":"eslint package/","test":"jest"},"_npmUser":{"name":"dhh","email":"david@hey.com"},"homepage":"https://github.com/rails/webpacker","repository":{"url":"git+https://github.com/rails/webpacker.git","type":"git"},"_npmVersion":"7.20.3","description":"Use webpack to manage app-like JavaScript modules in Rails","directories":{},"maintainers":[{"name":"pixeltrix","email":"andyw@pixeltrix.co.uk"},{"name":"matthewd","email":"matthew@trebex.net"},{"name":"rafaelfranca","email":"rafaelmfranca@gmail.com"},{"name":"tenderlove","email":"aaron.patterson@gmail.com"},{"name":"bitsweat","email":"jeremydaer@gmail.com"},{"name":"eileencodes","email":"eileencodes@gmail.com"},{"name":"dhh","email":"david@hey.com"},{"name":"kaspth","email":"kasper@hey.com"},{"name":"gauravtiwari","email":"gaurav@gauravtiwari.co.uk"}],"_nodeVersion":"16.7.0","dependencies":{"glob":"^7.2.0","js-yaml":"^4.1.0","webpack":"^5.53.0","@babel/core":"^7.15.5","webpack-cli":"^4.8.0","babel-loader":"^8.2.2","webpack-merge":"^5.8.0","@babel/runtime":"^7.15.4","webpack-sources":"^3.2.1","@babel/preset-env":"^7.15.6","pnp-webpack-plugin":"^1.7.0","path-complete-extname":"^1.0.0","terser-webpack-plugin":"^5.2.4","webpack-assets-manifest":"^5.0.6","compression-webpack-plugin":"^9.0.0","@babel/plugin-transform-runtime":"^7.15.0","@babel/plugin-proposal-class-properties":"^7.14.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.2.1","eslint":"^7.32.0","eslint-plugin-react":"^7.26.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.24.2","eslint-config-prettier":"^8.3.0","eslint-plugin-jsx-a11y":"^6.4.1"},"_npmOperationalInternal":{"tmp":"tmp/webpacker_6.0.0-rc.6_1636108182717_0.1636812615614538","host":"s3://npm-registry-packages"},"_id":"@rails/webpacker@6.0.0-rc.6","version":"6.0.0-rc.6"}