geekai/web/vue.config.js
liyuwanglan ae8239e5de 修改
2023-12-05 11:08:03 +08:00

26 lines
757 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const {defineConfig} = require('@vue/cli-service')
let webpack = require('webpack')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false, //关闭eslint校验
productionSourceMap: false, //在生产模式中禁用 Source Map既可以减少包大小也可以加密源码
configureWebpack: {
// disable performance hints
performance: {
hints: false
},
plugins: [
new webpack.optimize.MinChunkSizePlugin({minChunkSize: 10000})
]
},
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
outputDir: 'dist',
crossorigin: "anonymous",
devServer: {
allowedHosts: ['127.0.0.1:5678'],
port: 8888,
}
})