From 0d4347941bde437bb67b86ae168e58a08e8fa6db Mon Sep 17 00:00:00 2001 From: 6289aca71a7e4862742d51ec <6289aca71a7e4862742d51ec@devide> Date: Wed, 2 Nov 2022 02:08:57 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B7=A8=E5=9F=9F=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preview.yml | 10 ++++++++++ vue.config.js | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 preview.yml diff --git a/preview.yml b/preview.yml new file mode 100644 index 0000000..1f4524e --- /dev/null +++ b/preview.yml @@ -0,0 +1,10 @@ +# preview.yml +autoOpen: true # 打开工作空间时是否自动开启所有应用的预览 +apps: + - port: 8080 # 应用的端口 + run: yarn serve # 应用的启动命令 + command: # 使用此命令启动服务,且不执行run + root: ./ # 应用的启动目录 + name: my-first-app # 应用名称 + description: 我的第一个 App。 # 应用描述 + autoOpen: true # 打开工作空间时是否自动开启预览(优先级高于根级 autoOpen) \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index c82ae76..23e520c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,6 +3,12 @@ const path = require('path') const lessUrl=path.join(__dirname+'/src/styles/cover.less') module.exports = defineConfig({ + devServer: { + // 本地配置host生效 + allowedHosts:'all', + + }, + transpileDependencies: true, //代码检查 lintOnSave: false, -- GitLab