UAW/vue.config.js
2024-04-29 15:14:15 +08:00

41 lines
1.0 KiB
JavaScript

const { defineConfig } = require('@vue/cli-service')
const CopyWebpackPlugin = require("copy-webpack-plugin");
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
productionSourceMap: false,
publicPath: '/',
chainWebpack: (config) => {
config.module
.rule("source-map-loader")
.test(/\.js$/)
.enforce("pre")
.use("source-map-loader")
.loader("source-map-loader")
.end();
},
// devServer: {
// open: false,
// // host: '0.0.0.0', // 允许外部ip访问
// port: 8030, // 端口
// https: false, // 启用https
// // overlay: {
// // warnings: true,
// // errors: true
// // }, // 错误、警告在页面弹出
// proxy: {
// '/api': {
// target: process.env.VUE_APP_API_URL,
// changeOrigin: true, // 允许websockets跨域
// pathRewrite: {
// '^/api': ''
// }
// },
// }, // 代理转发配置,用于调试环境
// },
})