no message
This commit is contained in:
parent
ed079b313b
commit
4d0103a204
@ -1,38 +1,32 @@
|
|||||||
const { defineConfig } = require('@vue/cli-service')
|
const {
|
||||||
|
defineConfig
|
||||||
|
} = require('@vue/cli-service')
|
||||||
|
|
||||||
|
// const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
//设置为空打包后不分更目录还是多级目录
|
//设置为空打包后不分更目录还是多级目录
|
||||||
publicPath:'./',
|
publicPath: 'https://x--mo.com:8888/admin/',
|
||||||
//build编译后存放静态文件的目录
|
//build编译后存放静态文件的目录
|
||||||
assetsDir: "static/admin",
|
assetsDir: "static",
|
||||||
|
|
||||||
// build编译后不生成资源MAP文件
|
// build编译后不生成资源MAP文件
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
|
|
||||||
//开发服务,build后的生产模式还需nginx代理
|
//开发服务,build后的生产模式还需nginx代理
|
||||||
devServer: {
|
|
||||||
allowedHosts: 'all',
|
|
||||||
open: false, //运行后自动打开浏览器
|
|
||||||
port: process.env.VUE_APP_PORT, //挂载端口
|
|
||||||
proxy: {
|
|
||||||
'/api': {
|
|
||||||
target: process.env.VUE_APP_API_BASEURL,
|
|
||||||
ws: true,
|
|
||||||
pathRewrite: {
|
|
||||||
'^/api': '/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
chainWebpack: config => {
|
chainWebpack: config => {
|
||||||
// 移除 prefetch 插件
|
// 移除 prefetch 插件
|
||||||
config.plugins.delete('preload');
|
config.plugins.delete('preload');
|
||||||
config.plugins.delete('prefetch');
|
config.plugins.delete('prefetch');
|
||||||
config.resolve.alias.set('vue-i18n', 'vue-i18n/dist/vue-i18n.cjs.js');
|
config.resolve.alias.set('vue-i18n', 'vue-i18n/dist/vue-i18n.cjs.js');
|
||||||
},
|
},
|
||||||
|
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
|
output: {
|
||||||
|
// filename: 'app.[contenthash].js',
|
||||||
|
},
|
||||||
|
// plugins: [
|
||||||
|
// new MiniCssExtractPlugin({
|
||||||
|
// filename: 'app.[contenthash].css',
|
||||||
|
// }),
|
||||||
|
// ],
|
||||||
//性能提示
|
//性能提示
|
||||||
performance: {
|
performance: {
|
||||||
hints: false
|
hints: false
|
||||||
@ -41,7 +35,7 @@ module.exports = defineConfig({
|
|||||||
splitChunks: {
|
splitChunks: {
|
||||||
chunks: "all",
|
chunks: "all",
|
||||||
automaticNameDelimiter: '~',
|
automaticNameDelimiter: '~',
|
||||||
name: "scuiChunks",
|
name: "xChunks",
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
//第三方库抽离
|
//第三方库抽离
|
||||||
vendor: {
|
vendor: {
|
||||||
|
Loading…
Reference in New Issue
Block a user