diff --git a/vue.config.js b/vue.config.js index 79b7933fc77387292cc5f52ffd91f32d6bc0a518..e06f3af2b52314c08b83e23729481355a60c00e5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,12 +1,12 @@ const { defineConfig } = require('@vue/cli-service') const path = require('path'); function resolve(dir){ - return path.join(__dirname,dir)//设置绝对路径 + return path.join(__dirname,dir)//设置绝对路径 } let publicPath = '/' if (process.env.NODE_ENV === 'production') { publicPath = 'https://csdn.gitcode.host/csdn-datav/' -} +} module.exports = defineConfig({ assetsDir: 'csdn-datav', transpileDependencies: true, @@ -19,6 +19,13 @@ module.exports = defineConfig({ 'Access-Control-Allow-Origin': '*' } }, + // devServer: { + // allowedHosts:'all', + // port: '3000', + // headers: { + // 'Access-Control-Allow-Origin': '*' + // } + // }, productionSourceMap: false, chainWebpack: config => { config.resolve.alias.set('@', resolve('src'))