Files
CompanyProject/芳林公司项目/stest/vue.config.js
2024-09-27 01:32:49 +08:00

52 lines
1.2 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 isProduction = process.env.NODE_ENV === 'production';
const ProdConfig = require("./build/prod");
const DevConfig = require("./build/dev");
const VariableConfig = require('./build/variable');
module.exports = {
publicPath: './',
filenameHashing: true,
productionSourceMap: false,
parallel: require('os').cpus().length > 1,
lintOnSave: false,
/**
* vue-cli-plugin-autorouter 插件配置
* 参考文档https://www.npmjs.com/package/vue-cli-plugin-autorouter
*/
pluginOptions: {
route: {
TemplateFolderName: 'page',
RootFolderName: './src/application',
SaveConfigPath: '../../../src/core/config/route.config.ts'
}
},
devServer: {
hot: true,
hotOnly: true,
host: '0.0.0.0',
port: 9090,
compress: true,
open: true,
openPage: '#/',
overlay: {
warnings: true,
errors: true,
}
},
configureWebpack: (config) => {
// 设置程序核心入口
config.entry.app = './src/core/run/index.run.ts';
isProduction ? new ProdConfig(config) : ''
},
chainWebpack: (config) => {
isProduction ? config.plugin('html').tap(args => {
args[0].cdn = VariableConfig.cdn;
return args;
}) : '';
new DevConfig(config);
}
};