|
@@ -66,11 +66,26 @@ module.exports = {
|
|
target: "web", //可以解决browserslist 导致 webpack-dev-server 的自动刷新失效
|
|
target: "web", //可以解决browserslist 导致 webpack-dev-server 的自动刷新失效
|
|
/**
|
|
/**
|
|
* source-map: 外部
|
|
* source-map: 外部
|
|
|
|
+ * 提示错误代码,提示源代码位置。
|
|
* inline-source-map: 内联
|
|
* inline-source-map: 内联
|
|
|
|
+ * 提示错误代码,提示源代码位置。
|
|
* hidden-source-map: 外部
|
|
* hidden-source-map: 外部
|
|
|
|
+ * 提示到错误代码,错误原因,不能追踪到源代码错误,只是构建后。
|
|
* eval-source-map: 内联
|
|
* eval-source-map: 内联
|
|
|
|
+ * 提示错误代码,提示源代码位置。
|
|
* nosources-source-map: 外部
|
|
* nosources-source-map: 外部
|
|
|
|
+ * 提示错误代码,没有任何源代码信息。
|
|
* cheap-source-map: 外部
|
|
* cheap-source-map: 外部
|
|
|
|
+ * 提示一整行错误带,提示源代码位置。
|
|
* cheap-module-source-map: 外部
|
|
* cheap-module-source-map: 外部
|
|
|
|
+ * 提示错误代码,提示源代码位置。module会将loader的source map加入。
|
|
|
|
+ *
|
|
|
|
+ * 开发环境:速度快,调试更友好--eval-source-map
|
|
|
|
+ * eval inline cheap
|
|
|
|
+ * 生产环境:隐藏源代码
|
|
|
|
+ * 内联:会让代码体积变大,不考虑。
|
|
|
|
+ * mosources 、 source-map 、hidden
|
|
*/
|
|
*/
|
|
|
|
+ devtool:'hidden-source-map'
|
|
|
|
+
|
|
}
|
|
}
|