Skip to content

Commit 571a09f

Browse files
Merge pull request #3205 from Selectus2/fix/v6-upgrade-doc
v6 upgrade documentation fixed to get more understanding the use of j…
2 parents 7723154 + afe0495 commit 571a09f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/v6_upgrade.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ This means you have to configure integration with frameworks yourself, but webpa
2121
source_path: app/javascript
2222
source_entry_path: /
2323
```
24-
Then move your `app/javascript/packs/*` (including `application.js`) to `app/javascript/`.
25-
24+
Then move your `app/javascript/packs/*` (including `application.js`) to `app/javascript/`.
25+
2626
Check if you had any entry point files in child directories of your `source_entry_path`. Files for entry points in child directories are not supported by rails/webpacker v6.
2727

2828
2. Rename `config/webpack` to `config/webpack_old`
@@ -52,7 +52,7 @@ Example going to a specific version:
5252
bundle exec rails webpacker:install
5353
```
5454

55-
7. Update API usage of the view helpers by changing `javascript_packs_with_chunks_tag` and `stylesheet_packs_with_chunks_tag` to `javascript_pack_tag` and `stylesheet_pack_tag`. Ensure that your layouts and views will only have **at most one call** to `javascript_pack_tag` or `stylesheet_pack_tag`. You can now pass multiple bundles to these view helper methods. If you fail to changes this, you may experience performance issues, and other bugs related to multiple copies of React, like [issue 2932](https://github.com/rails/webpacker/issues/2932). If you expose jquery globally with `expose-loader,` by using `import $ from "expose-loader?exposes=$,jQuery!jquery"` in your `app/javascript/application.js`, pass the option `defer: false` to your `javascript_pack_tag`.
55+
7. Update API usage of the view helpers by changing `javascript_packs_with_chunks_tag` and `stylesheet_packs_with_chunks_tag` to `javascript_pack_tag` and `stylesheet_pack_tag`. Ensure that your layouts and views will only have **at most one call** to `javascript_pack_tag` and **at most one call** to `stylesheet_pack_tag`. You can now pass multiple bundles to these view helper methods. If you fail to changes this, you may experience performance issues, and other bugs related to multiple copies of React, like [issue 2932](https://github.com/rails/webpacker/issues/2932). If you expose jquery globally with `expose-loader,` by using `import $ from "expose-loader?exposes=$,jQuery!jquery"` in your `app/javascript/application.js`, pass the option `defer: false` to your `javascript_pack_tag`.
5656
8. 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.
5757
9. Copy over any custom webpack config from `config/webpack_old`. Common code previously called 'environment' should be changed to 'base', and import `environment` changed to `webpackConfig`.
5858

0 commit comments

Comments
 (0)