Skip to content

Commit 7514621

Browse files
authored
Update code-splitting-css.md
Updated doc with new syntax, using "use" and "options", instead of loader and in-line text options.
1 parent a42ced1 commit 7514621

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

content/guides/code-splitting-css.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Adapting from the previous example with the `css-loader`, we should add `Extract
4747

4848
```javascript
4949
...
50-
loader: ExtractTextPlugin.extract('css-loader?sourceMap') //Can be used without sourcemaps too.
50+
use: ExtractTextPlugin.extract({loader:'css-loader',options:{sourceMap:true}) //Can be used without sourcemaps too.
5151
...
5252
```
5353
@@ -77,8 +77,11 @@ module.exports = function () {
7777
rules: [{
7878
test: /\.css$/,
7979
exclude: /node_modules/,
80-
loader: ExtractTextPlugin.extract({
81-
loader: 'css-loader?sourceMap'
80+
use: ExtractTextPlugin.extract({
81+
loader: 'css-loader',
82+
options: {
83+
sourceMap: true
84+
}
8285
})
8386
}]
8487
},

0 commit comments

Comments
 (0)