add features
This commit is contained in:
parent
fe6d5df006
commit
753eaada75
@ -33,8 +33,8 @@ const systemJSImport = async (requestUrl: string) => {
|
||||
// sections: { version: '1.0.0', name: 'sections' }
|
||||
// }
|
||||
|
||||
export default async ({ apps: rawApps, navigations, config }) => {
|
||||
defineVirtualModule({ navigations, config })
|
||||
export default async ({ apps: rawApps, navigations, config, features }) => {
|
||||
defineVirtualModule({ navigations, config, features })
|
||||
|
||||
const apps = new Apps(rawApps)
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
const createVirtualModule = ({ config, navigations }) => ({
|
||||
const createVirtualModule = ({ config, navigations, features }) => ({
|
||||
getConfig: () => config,
|
||||
getConfigValue: (key) => config[key],
|
||||
getConfigValue: (pkg: string) => config[pkg],
|
||||
getNavigations: () => navigations,
|
||||
getNavigationsValue: (key) => navigations[key],
|
||||
getNavigationsValue: (pkg: string) => navigations[pkg],
|
||||
getAllFeatures: () => features,
|
||||
getFeatures: (pkg: string) => features[pkg]
|
||||
})
|
||||
|
||||
export const defineVirtualModule = (params) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user