Skip to content

Commit

Permalink
fix: base默认应该是空字符串
Browse files Browse the repository at this point in the history
  • Loading branch information
wanchun committed Mar 25, 2021
1 parent 591b8c4 commit 619acae
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/create-fes-app/templates/app/pc/.fes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


export default {
base: '/foo/',
base: '',
define: {
__DEV__: false
},
Expand Down
2 changes: 1 addition & 1 deletion packages/fes-plugin-qiankun/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: `
Expand Down
4 changes: 2 additions & 2 deletions packages/fes-preset-built-in/src/plugins/features/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ export default (api) => {
api.describe({
key: 'base',
config: {
default: '/',
default: '',
schema(joi) {
return joi.string();
return joi.string().allow('');
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})
});
Expand Down
4 changes: 2 additions & 2 deletions packages/fes-template/.fes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


export default {
base: '/foo/',
base: '',
define: {
__DEV__: false
},
Expand All @@ -12,7 +12,7 @@ export default {
publicPath: '/',
access: {
roles: {
admin: ["/", "https://www.baidu.com"]
admin: ["/", "/store", "https://www.baidu.com"]
}
},
request: {
Expand Down

0 comments on commit 619acae

Please sign in to comment.