<> 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,
mysql Slow query analysis Arduino Design of intelligent car ( One )el-select Parameter problem folk understanding - Gradient descent method ( one )- Fundamentals of Mathematics 【 Data structure and algorithm 12】 Binary search , Interpolation search , fibonacci search vue el-select Remote search Array de duplication main 5 Two methods , Combination query of computer room charging system Jetson Nano read GPS data (TTL turn USB)Matlab Solving nonlinear equations by Newton iterative method