1 Star 0 Fork 53

牛顿不吃苹果 / thingspanel-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 2.33 KB
一键复制 编辑 原始数据 按行查看 历史
// const path = require("path");
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
// publicPath: "",
productionSourceMap: false, // 生产打包时不输出map文件
runtimeCompiler: true,
devServer: {
port: 8080,
open: true,
overlay: {
warnings: false,
errors: true,
},
proxy: {
"/api": {
target: process.env.VUE_APP_BASE_URL + "/api",
changeOrigin: true, // 是否改变域名
pathRewrite: {
// 路径重写
"/api": "" // 这个意思就是以api开头的,定向到哪里, 如果你的后边还有路径的话, 会自动拼接上
}
},
"/red": {
target: process.env.VUE_APP_RED_BASE_URL,
changeOrigin: true, // 是否改变域名
pathRewrite: {
// 路径重写
"/red": ""
}
}
}
},
lintOnSave: false,
configureWebpack: {
resolve: {
alias: {
// If using the runtime only build
vue$: "vue/dist/vue.runtime.esm.js" // 'vue/dist/vue.runtime.common.js' for webpack 1
// Or if using full build of Vue (runtime + compiler)
// vue$: 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1
}
},
plugins: [
new CompressionPlugin({
filename: '[path][base].gz',
algorithm: 'gzip',
test: /\.js$|\.css$|\.html$/,
threshold: 10240,
minRatio: 0.8
}),
],
module: {
rules: [
{
test: /\.swf$/,
loader: 'url-loader',
options: {
limit: 10000
}
}
]
},
},
css: {
loaderOptions: {
postcss: {
config: {
path: __dirname
}
},
scss: {
prependData: `@import "@/assets/sass/vendors/vue/vuetify/variables.scss";`
}
}
},
transpileDependencies: ["vuetify"]
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lindar111/thingspanel-vue.git
git@gitee.com:lindar111/thingspanel-vue.git
lindar111
thingspanel-vue
thingspanel-vue
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891