Files
energy_storage/web/vue.config.js
zhoumengru 1f20215383 feat(system): 优化系统日志页面布局和功能
- 修改系统日志页面的列配置,增加固定列和对齐方式
- 优化表格组件的样式和功能,支持右列固定和自定义样式
- 调整分页配置,统一表格相关属性
2025-09-10 09:23:47 +08:00

71 lines
1.6 KiB
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')
const path = require('path')
module.exports = defineConfig({
transpileDependencies: true,
publicPath: '/',
// 输出文件目录
outputDir: 'dist',
// 静态资源目录
assetsDir: 'static',
devServer: {
proxy: {
'/api': {
// 代理前缀,可以自定义(如 '/api'
target: 'http://192.168.0.187:19801', // 目标服务器地址
changeOrigin: true, // 是否改变请求源(跨域必备)
pathRewrite: {
'^/api': '' // 重写路径,去掉 '/api' 前缀
}
}
}
},
css: {
loaderOptions: {
scss: {
additionalData: `
@import "@/style/color.scss";
@import "@/style/antd.scss";
` //在每个 .scss 文件顶部自动添加这行代码,无需手动导入
},
less: {
lessOptions: {
javascriptEnabled: true // 兼容 Less 3.0+ 的 JavaScript 表达式
}
}
},
extract: {
ignoreOrder: true // 忽略 CSS 顺序警告
}
},
// webpack相关配置
configureWebpack: {
// 自定义打包入口
// 扩展 webpack 配置
plugins: [
// 添加插件
],
resolve: {
alias: {
'@': path.join(__dirname, 'src')
}
}
},
// 是否在开发环境下通过 eslint-loader 在每次保存时 lint 代码
lintOnSave: process.env.NODE_ENV !== 'production',
// 是否使用包含运行时编译器的 Vue 构建版本
runtimeCompiler: false,
// 生产环境的 source map
productionSourceMap: true,
// 第三方插件配置
pluginOptions: {
// ...
}
})