Commit 33b59eef by 王志慧

commit

1 parent 765e8e6c
......@@ -176,14 +176,14 @@ module.exports = {
Object.assign(config, {
plugins: [
...config.plugins,
new SentryWebpackPlugin({
// webpack specific configuration
release: "0.0.1",
include: "./dist", // 需要上传到sentry服务器的资源目录,会自动匹配js 以及map文件
ignore: ["node_modules", "vue.config.js"], // 忽略文件目录,当然我们在inlcude中制定了文件路径,这个忽略目录可以不加
configFile: ".sentryclirc",
urlPrefix: "~/dj-carlife-web/"
})
// new SentryWebpackPlugin({
// // webpack specific configuration
// release: "0.0.1",
// include: "./dist", // 需要上传到sentry服务器的资源目录,会自动匹配js 以及map文件
// ignore: ["node_modules", "vue.config.js"], // 忽略文件目录,当然我们在inlcude中制定了文件路径,这个忽略目录可以不加
// configFile: ".sentryclirc",
// urlPrefix: "~/dj-carlife-web/"
// })
]
})
},
......@@ -191,15 +191,15 @@ module.exports = {
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
chainWebpack: (config) => {
// 删除注释
config.optimization.minimizer("terser").tap((args) => {
args[0].terserOptions.compress.drop_console = true
args[0].terserOptions.compress.drop_debugger = true
args[0].terserOptions.compress.pure_funcs = ["console.log"]
args[0].terserOptions.output = {
comments: false
}
return args
})
// config.optimization.minimizer("terser").tap((args) => {
// args[0].terserOptions.compress.drop_console = true
// args[0].terserOptions.compress.drop_debugger = true
// args[0].terserOptions.compress.pure_funcs = ["console.log"]
// args[0].terserOptions.output = {
// comments: false
// }
// return args
// })
/**
* 删除懒加载模块的 prefetch preload,降低带宽压力
* https://cli.vuejs.org/zh/guide/html-and-static-assets.html#prefetch
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!