Skip to content

Webpacker instructions: fix incompatibility with Webpack 5 #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/switch_from_webpacker.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ With the right loaders, webpack can handle CSS files. This setup _only_ uses jsb

```sh
# From the CLI, add loaders, plugins, and node sass
yarn add css-loader sass sass-loader mini-css-extract-plugin webpack-fix-style-only-entries
yarn add css-loader sass sass-loader mini-css-extract-plugin webpack-remove-empty-scripts
```

2. Configure webpack
Expand All @@ -180,7 +180,7 @@ yarn add css-loader sass sass-loader mini-css-extract-plugin webpack-fix-style-o
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// Removes exported JavaScript files from CSS-only entries
// in this example, entry.custom will create a corresponding empty custom.js file
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');

module.exports = {
entry: {
Expand All @@ -206,7 +206,7 @@ module.exports = {
},
plugins: [
// Include plugins
new FixStyleOnlyEntriesPlugin(),
new RemoveEmptyScriptsPlugin(),
new MiniCssExtractPlugin(),
],
};
Expand Down