|
@@ -37,6 +37,8 @@ module.exports = {
|
|
|
[process.env.VUE_APP_BASE_API]: {
|
|
|
target: `https://o3tapi.radio1964.com/admin`, // 测试
|
|
|
// target: `http://192.168.0.217:2678/admin`, // 付新保本地
|
|
|
+ // target: `http://192.168.0.185:2027`, // 陈浩
|
|
|
+ // target: `http://10.0.1.42:2027`,
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: {
|
|
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
|
@@ -48,7 +50,9 @@ module.exports = {
|
|
|
css: {
|
|
|
loaderOptions: {
|
|
|
sass: {
|
|
|
- sassOptions: { outputStyle: "expanded" }
|
|
|
+ sassOptions: {
|
|
|
+ outputStyle: "expanded"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -62,10 +66,10 @@ module.exports = {
|
|
|
plugins: [
|
|
|
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
|
|
new CompressionPlugin({
|
|
|
- test: /\.(js|css|html)?$/i, // 压缩文件格式
|
|
|
- filename: '[path].gz[query]', // 压缩后的文件名
|
|
|
- algorithm: 'gzip', // 使用gzip压缩
|
|
|
- minRatio: 0.8 // 压缩率小于1才会压缩
|
|
|
+ test: /\.(js|css|html)?$/i, // 压缩文件格式
|
|
|
+ filename: '[path].gz[query]', // 压缩后的文件名
|
|
|
+ algorithm: 'gzip', // 使用gzip压缩
|
|
|
+ minRatio: 0.8 // 压缩率小于1才会压缩
|
|
|
})
|
|
|
],
|
|
|
},
|
|
@@ -97,7 +101,7 @@ module.exports = {
|
|
|
.plugin('ScriptExtHtmlWebpackPlugin')
|
|
|
.after('html')
|
|
|
.use('script-ext-html-webpack-plugin', [{
|
|
|
- // `runtime` must same as runtimeChunk name. default is `runtime`
|
|
|
+ // `runtime` must same as runtimeChunk name. default is `runtime`
|
|
|
inline: /runtime\..*\.js$/
|
|
|
}])
|
|
|
.end()
|
|
@@ -125,10 +129,9 @@ module.exports = {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- config.optimization.runtimeChunk('single'),
|
|
|
- {
|
|
|
- from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
|
|
- to: './' //到根目录下
|
|
|
+ config.optimization.runtimeChunk('single'), {
|
|
|
+ from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
|
|
+ to: './' //到根目录下
|
|
|
}
|
|
|
}
|
|
|
)
|