systemjs - How to lazy load jspm module with angular 2? -
i trying load bundle dynamically. have main bundle, , lazy loaded bundle do:
jspm bundle-sfx src/comps/app1/app1.js out.js --skip-source-maps and in angular2 code run
if (condition){ return system.import('/dist/public/out.js').then(c => c[name]); } the problem getting error of:
exception: typeerror: amd module http://localhost:8003/dist/public/out.js did not define is there special need able load app1 dynamically (lazy load)?
(if don't bundle lazy loading working great way)...
my config.js is:
... packages: { "src": { "main": "app", "defaultextension": "ts", "meta": { "*.js": { "loader": "ts" }, "*.ts": { "loader": "ts" }, "*.css": { "loader": "css" } } ... so can see didn't put special package entry app1 (don't think need to?!?!?!)
tx , regards
sean.
Comments
Post a Comment