Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
62b91adf0e | |||
2f6a56c857 |
@ -27,11 +27,11 @@ import { LazyModule } from 'smartsystem'
|
|||||||
|
|
||||||
import * as _myPlugin from 'myPlugin' // plugin does not get loaded here at runtime
|
import * as _myPlugin from 'myPlugin' // plugin does not get loaded here at runtime
|
||||||
let myPluginLazy = new LazyModule<typeof _myPlugin>('myPlugin')
|
let myPluginLazy = new LazyModule<typeof _myPlugin>('myPlugin')
|
||||||
let myPluginLazy.setLoader('npm') // sets the loader, defaults to npm anyway
|
myPluginLazy.setLoader('npm') // sets the loader, defaults to npm anyway
|
||||||
|
|
||||||
import * as _anotherPlugin from 'anotherPlugin' // plugin does not get loaded here at runtime
|
import * as _anotherPlugin from 'anotherPlugin' // plugin does not get loaded here at runtime
|
||||||
let anotherPluginLazy = new LazyModule<typeof _anotherPlugin>('anotherPlugin')
|
let anotherPluginLazy = new LazyModule<typeof _anotherPlugin>('anotherPlugin')
|
||||||
let anotherPluginLazy.setLoader('systemjs') // sets the loader to systemjs
|
anotherPluginLazy.setLoader('systemjs') // sets the loader to systemjs
|
||||||
|
|
||||||
myPluginLazy.whenLoaded.then(myPlugin => {
|
myPluginLazy.whenLoaded.then(myPlugin => {
|
||||||
/* do something with myPlugin.
|
/* do something with myPlugin.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartsystem",
|
"name": "smartsystem",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"description": "simplifies lazy loading with TypeScript",
|
"description": "simplifies lazy loading with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user