-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack 配置文件 #19
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
webpack.config.js
是 webpack 的默认打包配置文件,也可以通过npx webpack --config [name]
来设置。常用配置项
mode
:打包环境,分为production
和development
,生产环境下代码会被压缩entry
中指定多个值output
中指定publicPath
devtool
:就是去配置sourcemap
,方便调试,准确定位到代码错误:cheap
:定位到行,不定位到列module
:把依赖模块中的代码一并做映射eval
:使用eval
形式做sourcemap
映射inline
:行内的映射关系推荐的
devtool
配置:The text was updated successfully, but these errors were encountered: