webpack action and methods of use

Disclaimer: If you have any objection to this article, then please write your comments in the article comments at. If you find this article interesting, please share and forward, or you can look at, you acknowledge and encouragement of our articles. Wish everyone in the programming this road, farther and farther. https://blog.csdn.net/weixin_44369568/article/details/91457906

webpack What is the role?

1, webpack is a node of third-party packages

2, the file can be packaged modular dependent, the packaging code will follow

Front-end modular specification

1, since the execution of the function using

2, AMD specification

3, CMD specification

4、commonjs

babel

Tells the server where to provide content

devServer.contentBase

exclude exclude specific conditions

include matching specific criteria

ExtractTextWebpackPlugin extract css file

url-loader smaller file parsing

file-loader parsing large files

file-loader file the return address hash value

url - loader returns

Global installed babel

babel-loader@7

babel-preset-env

babel-core

Test environment development

Production production

The combined CI npm i webpack-merge -D

devtool

Controls whether and how to generate source map

Guess you like

Origin blog.csdn.net/weixin_44369568/article/details/91457906