6_0_upgrade.md in webpacker-6.0.0.beta.4 vs 6_0_upgrade.md in webpacker-6.0.0.beta.5
- old
+ new
@@ -28,21 +28,35 @@
```bash
bundle exec rails webpacker:install
```
-- Change `javascript_pack_tag` and `stylesheet_pack_tag` to `javascript_packs_with_chunks_tag` and
- `stylesheet_packs_with_chunks_tag`
+- Change `javascript_packs_with_chunks_tag` and `stylesheet_packs_with_chunks_tag` to `javascript_pack_tag` and
+ `stylesheet_pack_tag`.
7. If you are using any integrations like `css`, `React` or `TypeScript`. Please see https://github.com/rails/webpacker#integrations section on how they work in v6.0.
8. Copy over any custom webpack config from `config/webpack_old`
+- Common code previously called 'environment' changed to 'base'
+- import `environment` changed name to `webpackConfig`.
+
```js
// config/webpack/base.js
const { webpackConfig, merge } = require('@rails/webpacker')
const customConfig = require('./custom')
module.exports = merge(webpackConfig, customConfig)
```
9. Copy over custom browserlist config from `.browserlistrc` if it exists into the `"browserlist"` key in `package.json` and remove `.browserslistrc`.
+
+10. `extensions` was removed from the webpacker.yml file. Move custom extensions to
+ your configuration by by merging an object like this. For more details, see docs for
+ [Webpack Configuration](https://github.com/rails/webpacker/blob/master/README.md#webpack-configuration)
+```js
+{
+ resolve: {
+ extensions: ['.ts', '.tsx']
+ }
+}
+```