Skip to content

Commit

Permalink
docs: fix ambiguous docs (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-Bernardito authored Oct 9, 2020
1 parent 7335077 commit 884cbfe
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Works like [`output.filename`](https://webpack.js.org/configuration/output/#outp
Type: `String|Function`
Default: `based on filename`

> i Specifying `chunkFilename` as a `function` is only available in webpack@5
This option determines the name of non-entry chunk files.

Works like [`output.chunkFilename`](https://webpack.js.org/configuration/output/#outputchunkfilename)
Expand All @@ -104,7 +106,8 @@ Works like [`output.chunkFilename`](https://webpack.js.org/configuration/output/
Type: `Boolean`
Default: `false`

Remove Order Warnings
Remove Order Warnings.
See [examples](#remove-order-warnings) below for details.

### Loader Options

Expand Down Expand Up @@ -391,7 +394,7 @@ module.exports = {

### Advanced configuration example

This plugin should be used only on `production` builds without `style-loader` in the loaders chain, especially if you want to have HMR in `development`.
This plugin should not be used with `style-loader` in the loaders chain.

Here is an example to have both HMR in `development` and your styles extracted in a file for `production` builds.

Expand All @@ -411,8 +414,8 @@ const plugins = [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: devMode ? '[name].css' : '[name].[hash].css',
chunkFilename: devMode ? '[id].css' : '[id].[hash].css',
filename: devMode ? '[name].css' : '[name].[contenthash].css',
chunkFilename: devMode ? '[id].css' : '[id].[contenthash].css',
}),
];
if (devMode) {
Expand Down Expand Up @@ -459,8 +462,8 @@ const plugins = [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: devMode ? '[name].css' : '[name].[hash].css',
chunkFilename: devMode ? '[id].css' : '[id].[hash].css',
filename: devMode ? '[name].css' : '[name].[contenthash].css',
chunkFilename: devMode ? '[id].css' : '[id].[contenthash].css',
}),
];
if (devMode) {
Expand Down

0 comments on commit 884cbfe

Please sign in to comment.