You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/options.md
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -185,3 +185,64 @@ module.exports = {
185
185
]
186
186
}
187
187
```
188
+
189
+
### extractCSS
190
+
191
+
> New in 12.0.0
192
+
193
+
Automatically extracts the CSS using `extract-text-webpack-plugin`. Works for most pre-processors out of the box, and handles minification in production as well.
194
+
195
+
The value passed in can be `true`, or an instance of the plugin (so that you can use multiple instances of the extract plugin for multiple extracted files).
196
+
197
+
This should be only used in production so that hot-reload works during development.
198
+
199
+
Example:
200
+
201
+
```js
202
+
// webpack.config.js
203
+
var ExtractTextPlugin =require("extract-text-webpack-plugin")
204
+
205
+
module.exports= {
206
+
// other options...
207
+
module: {
208
+
rules: [
209
+
{
210
+
test:/\.vue$/,
211
+
loader:'vue-loader',
212
+
options: {
213
+
extractCSS:true
214
+
}
215
+
}
216
+
]
217
+
},
218
+
plugins: [
219
+
newExtractTextPlugin("style.css")
220
+
]
221
+
}
222
+
```
223
+
224
+
Or passing in an instance of the plugin:
225
+
226
+
```js
227
+
// webpack.config.js
228
+
var ExtractTextPlugin =require("extract-text-webpack-plugin")
0 commit comments