diff --git a/preview.yml b/preview.yml new file mode 100644 index 0000000000000000000000000000000000000000..1f4524e9ff85f5f6ca73ea4d87b775f7c0856b84 --- /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 c82ae7699f97becd1fc97e6ea793defabc2709d6..23e520c6814bdf27449e2e0eae7d4cb167d63ca7 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,