webpack in common use or common plug presentations

 

A, ExtractTextWebpackPlugin effect plug-ins

On the second question, my answer is of course. If you do not, it will produce some css and js confusing question, let us look at not ExtractTextWebpackPlugin will reproduce the scene.

During configuration webpack, the style you want to install by npm -loader, css- to handle the css file loader loader and some related, then do the run after css and js configuration webpack command module is packaged in modules.

ExtractTextWebpackPlugin plug-in properties

newExtractTextPlugin(options:filename|object):

1.id: This is the unique identification widget default is automatically generated.

2.filename: Defines the name of the file. If there are multiple entry file should be defined as: [name] .css.

3.allChunks: When `CommonsChunkPlugin` and extracted with a chunk when the chunk in common (from` ExtractTextPlugin.extract`), `allChunks` ** must be set to` true`.

4.ignoreOrder: Disable checking sequence (which CSS module very useful!), The default `false`.

5.disable: disable the plug

ExtractTextPlugin.extract(options:loader|object)

1.options.use: what kind of file to compile loader refers to the need

2.options.fallback: After compiling css file to extract what loader

3.options.publicfile: items used to cover the path, the path of the file to generate file css

 

Guess you like

Origin www.cnblogs.com/yuanjili666/p/11795459.html