From f16579c5a1ee3cef257251e8ea1b71296792e97e Mon Sep 17 00:00:00 2001 From: winixt Date: Mon, 11 Apr 2022 16:47:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/plugins/commands/webpackConfig/index.js | 1 - .../src/plugins/generateFiles/fes/defaultContainer.tpl | 1 + .../src/plugins/generateFiles/fes/index.js | 4 +++- packages/fes-template/.fes.js | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/fes-build-webpack/src/plugins/commands/webpackConfig/index.js b/packages/fes-build-webpack/src/plugins/commands/webpackConfig/index.js index 5075e4a2..eb2fef3c 100644 --- a/packages/fes-build-webpack/src/plugins/commands/webpackConfig/index.js +++ b/packages/fes-build-webpack/src/plugins/commands/webpackConfig/index.js @@ -280,7 +280,6 @@ export default async function getConfig({ api, cwd, config, env, entry = {}, mod const memo = webpackConfig.toConfig(); memo.infrastructureLogging = { ...memo.infrastructureLogging, - level: 'verbose', }; memo.output = { ...memo.output, diff --git a/packages/fes-preset-built-in/src/plugins/generateFiles/fes/defaultContainer.tpl b/packages/fes-preset-built-in/src/plugins/generateFiles/fes/defaultContainer.tpl index b8ada01e..3d836cf3 100644 --- a/packages/fes-preset-built-in/src/plugins/generateFiles/fes/defaultContainer.tpl +++ b/packages/fes-preset-built-in/src/plugins/generateFiles/fes/defaultContainer.tpl @@ -1,3 +1,4 @@ import { defineComponent } from 'vue'; +import { RouterView } from '{{{ runtimePath }}}'; export default defineComponent(() => () => ()); diff --git a/packages/fes-preset-built-in/src/plugins/generateFiles/fes/index.js b/packages/fes-preset-built-in/src/plugins/generateFiles/fes/index.js index 9ced85a3..ad65a3c7 100644 --- a/packages/fes-preset-built-in/src/plugins/generateFiles/fes/index.js +++ b/packages/fes-preset-built-in/src/plugins/generateFiles/fes/index.js @@ -61,7 +61,9 @@ export default function (api) { const defaultContainerName = 'defaultContainer'; api.writeTmpFile({ path: `${defaultContainerName}.jsx`, - content: readFileSync(join(__dirname, `./${defaultContainerName}.tpl`), 'utf-8'), + content: Mustache.render(readFileSync(join(__dirname, `./${defaultContainerName}.tpl`), 'utf-8'), { + runtimePath, + }), }); }); } diff --git a/packages/fes-template/.fes.js b/packages/fes-template/.fes.js index 82c2d81d..e821a4df 100644 --- a/packages/fes-template/.fes.js +++ b/packages/fes-template/.fes.js @@ -5,7 +5,6 @@ export default { define: { __DEV__: false }, - publicPath: './', html: { title: '海贼王' },