Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d5e08e4178 | |||
| 14e5c02a03 | |||
| ac1e2a4df3 | |||
|
|
0636ce1ff2 | ||
|
|
47839a963c | ||
|
|
3683151cb2 | ||
|
|
033865105f | ||
|
|
556c31c56c |
42
dist/index.js
vendored
42
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@ijl/fire.app",
|
||||
"version": "1.0.3",
|
||||
"version": "1.2.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"start": "nodemon ./stubs/server.js",
|
||||
"build": "webpack --mode development",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import "systemjs/dist/s";
|
||||
import "systemjs/dist/system";
|
||||
import "systemjs/dist/extras/amd";
|
||||
import "systemjs/dist/extras/named-register";
|
||||
import "systemjs/dist/extras/named-exports";
|
||||
@@ -34,7 +34,7 @@ const systemJSImport = async (requestUrl: string) => {
|
||||
// }
|
||||
|
||||
export default async ({ apps: rawApps, navigations, config }) => {
|
||||
defineVirtualModule({navigations, config})
|
||||
defineVirtualModule({ navigations, config })
|
||||
|
||||
const apps = new Apps(rawApps)
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
export const defineVirtualModule = (params) => {
|
||||
const virtualModule = createVirtualModule(params)
|
||||
// @ts-ignore
|
||||
global.define('@ijl/fire.app', [], virtualModule)
|
||||
}
|
||||
|
||||
const createVirtualModule = ({config, navigations}) => ({
|
||||
const createVirtualModule = ({ config, navigations }) => ({
|
||||
getConfig: () => config,
|
||||
getConfigValue: (key) => config[key],
|
||||
getNavigations: () => navigations,
|
||||
getNavigationsValue: (key) => navigations[key],
|
||||
})
|
||||
|
||||
export const defineVirtualModule = (params) => {
|
||||
const virtualModule = createVirtualModule(params)
|
||||
// @ts-ignore
|
||||
System.set('root.scope', {
|
||||
...virtualModule
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ module.exports = {
|
||||
index: "./src/main.ts"
|
||||
},
|
||||
output: {
|
||||
library: "bootstrap",
|
||||
library: "fireapp",
|
||||
path: path.resolve(__dirname, outputDirectory),
|
||||
libraryExport: "default",
|
||||
publicPath: `/boorstrap/${pkg.version}/`
|
||||
publicPath: `/fireapp/${pkg.version}/`
|
||||
},
|
||||
|
||||
plugins: [new CleanWebpackPlugin()],
|
||||
|
||||
Reference in New Issue
Block a user