Commit 33b59eef by 王志慧

commit

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