打包发布路径配置逻辑修改
This commit is contained in:
parent
24d93e9c64
commit
ffd7c9797f
@ -12,6 +12,13 @@ const webpack = require('webpack');
|
||||
const name = defaultSettings.title; // page title
|
||||
const port = 9527; // dev port
|
||||
|
||||
let publicPath = '';
|
||||
let outputDir = '';
|
||||
(function () {
|
||||
publicPath = process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc';
|
||||
outputDir = process.env.VUE_APP_PRO == 'local' ? 'dist' : 'dist/cbtc';
|
||||
})();
|
||||
|
||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||
module.exports = {
|
||||
/**
|
||||
@ -21,8 +28,8 @@ module.exports = {
|
||||
* In most cases please use '/' !!!
|
||||
* Detail: https://cli.vuejs.org/config/#publicpath
|
||||
*/
|
||||
publicPath: '/cbtc',
|
||||
outputDir: 'dist/cbtc',
|
||||
publicPath: publicPath,
|
||||
outputDir: outputDir,
|
||||
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
|
||||
lintOnSave: false,
|
||||
productionSourceMap: false, // 项目打包后是否压缩
|
||||
|
Loading…
Reference in New Issue
Block a user