diff --git a/packages/create-fes-app/templates/app/pc/.fes.js b/packages/create-fes-app/templates/app/pc/.fes.js index db77aa6f..03ee6f39 100644 --- a/packages/create-fes-app/templates/app/pc/.fes.js +++ b/packages/create-fes-app/templates/app/pc/.fes.js @@ -2,7 +2,7 @@ export default { - base: '/foo/', + base: '', define: { __DEV__: false }, diff --git a/packages/fes-plugin-qiankun/src/main/index.js b/packages/fes-plugin-qiankun/src/main/index.js index 2caea696..5ee3f2d1 100644 --- a/packages/fes-plugin-qiankun/src/main/index.js +++ b/packages/fes-plugin-qiankun/src/main/index.js @@ -80,7 +80,7 @@ export default function (api) { const { main: options } = api.config?.qiankun || {}; const masterHistoryType = api.config?.router?.mode || defaultHistoryType; - const base = api.config.base || '/'; + const base = api.config.base; api.writeTmpFile({ path: absMasterOptionsPath, content: ` diff --git a/packages/fes-preset-built-in/src/plugins/features/base.js b/packages/fes-preset-built-in/src/plugins/features/base.js index bb956489..42e4f239 100644 --- a/packages/fes-preset-built-in/src/plugins/features/base.js +++ b/packages/fes-preset-built-in/src/plugins/features/base.js @@ -3,9 +3,9 @@ export default (api) => { api.describe({ key: 'base', config: { - default: '/', + default: '', schema(joi) { - return joi.string(); + return joi.string().allow(''); } } }); diff --git a/packages/fes-preset-built-in/src/plugins/misc/route/index.js b/packages/fes-preset-built-in/src/plugins/misc/route/index.js index c51e709e..5aea8a18 100644 --- a/packages/fes-preset-built-in/src/plugins/misc/route/index.js +++ b/packages/fes-preset-built-in/src/plugins/misc/route/index.js @@ -280,7 +280,7 @@ export default function (api) { runtimePath, routes, config: api.config, - routerBase: api.config.base || '', + routerBase: api.config.base, CREATE_HISTORY: historyType[api.config.router.mode] || 'createWebHashHistory' }) }); diff --git a/packages/fes-template/.fes.js b/packages/fes-template/.fes.js index e0f64071..6ffe3d69 100644 --- a/packages/fes-template/.fes.js +++ b/packages/fes-template/.fes.js @@ -2,7 +2,7 @@ export default { - base: '/foo/', + base: '', define: { __DEV__: false }, @@ -12,7 +12,7 @@ export default { publicPath: '/', access: { roles: { - admin: ["/", "https://www.baidu.com"] + admin: ["/", "/store", "https://www.baidu.com"] } }, request: {