<> Key plug-ins plugin introduce

The functions of plug-ins and module parsing are different , Module parsing is to import non es5 format js Or other resource type files , Customized some loader.
The plug-in processes the final package file , It's understandable loader It's to prepare for packing ,plugin It's packing and then processing

How to use the official plug-in ( Built in plug-in 2 step ) 1 Import in configuration file XxxxPlugin,constwp=require(XxxxPlugin) 2 stay
plugins Add a plug-in instance to this array ,newwp.XxxxPlugin({ object })

How to use the third party plug-in ( The first 3 square 3 step , One more installation ) 1 install ( Third party plug-ins to be installed ) root directory >cnpmi-DXxxxPlugin 2
Import plug-ins in configuration file constXxxxPlugin=require(‘xxxx-plugin’) 3 stay plugins
Add a plug-in instance to this array ,newXxxxPlugin({ object })

Official plug-ins include
It can be printed and viewed in the configuration constwebpack=require(‘webpack’) console.log(webpack)// What can be seen here are
webpack Built in plug-ins

<> Plug in list
> 01.webpack.BannerPlugin // add comments of explanations > 02.terser-webpack-plugin // Code reduction , compress > 03.html-
webpack-plugin generate html page > 04.extract-text-webpack-plugin,mini-css-extract-plugin
// Extraction and extraction css > 05.DefinePlugin
// Define a global constant , as newwp.DefinePlugin({BJ:JSON.stringify(' Beijing '),}), It's being packed js The file can >
Direct use , As in ./src/main.js in console.log(' I defined it in the configuration file '+BJ) > 06.Dllplugins //
Allows you to create a global constant that can be configured at compile time > 07.copy-webpack-plugin // stay webpack Copy files and folders in > 08.optimize-
css-assets-webpack-plugin // compress css > 09.assets-webpack-plugin //
assets-webpack-plugin > 10:EnvironmentPlugin// differ DefinePlugin, The default value will be
EnvironmentPlugin implement JSON.stringify > 11.cross-env //scripts Setting environment variables > 12.
ProvidePlugin// Microservices api to configure > 13.preload-webpack-plugin // Let static resources support DNS Pre parsing and preloading

©2019-2020 Toolsou All rights reserved,
Final review of database : Summary of comprehensive application questions Laplance operator ( Second derivative ) Simple learning of computer composition principle pyqt Button call python program _PyQt: Link button to function in program How much can you go up once you change jobs ? Today, I saw the ceiling of job hopping python in str Function usage _python in str Usage Summary of built-in functions MySQL trigger web The server nginx---linux Installation and deployment C++ Chapter V polymorphism exercises :( It's coming to an end )python Check built-in functions , How to check python Built in function