From 56aafef5f6160bafa493ff62c7bbfedfee10e7dd Mon Sep 17 00:00:00 2001 From: ylwdev Date: Tue, 23 Aug 2022 17:18:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91IDE=20=E6=9A=82=E6=97=B6=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/vue.config.js b/vue.config.js index 79b7933..e06f3af 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')) -- GitLab