Open naveedahmed1 opened 8 years ago
Hi! I haven't tried bundling any Angular2 apps, but I will try to look into it. Are you sure the issue is with this package? If you find a solution please let me know :)
I have the same problem. Do you have any solutions ?
Same problem here, and can't get any viable solution at the moment.
I have come across the same problem and it looks like it is an issue with how outlayer is packaged into masonry.pkgd.js
. I found 2 solutions:
Change SystemJS configuration to look like:
paths: {
"npm:": "./node_modules/"
},
packages: {
"angular2-masonry": { "defaultExtension": "js", "main": "index" },
"outlayer": { "defaultExtension": "js" }
},
map: {
"angular2-masonry": "npm:angular2-masonry",
"masonry-layout": "npm:masonry-layout/masonry.js",
"outlayer": "npm:outlayer",
"get-size/get-size": "npm:get-size/get-size.js",
"ev-emitter/ev-emitter": "npm:ev-emitter/ev-emitter.js",
"fizzy-ui-utils/utils": "npm:fizzy-ui-utils/utils.js",
"desandro-matches-selector/matches-selector": "npm:desandro-matches-selector/matches-selector.js",
}
Change how ./item
is required/defined in the masonry.pkgd.js
and masonry.pkgd.min.js
files.
Simply replace the 2 instances that "./item"
occurs with "outlayer/item"
Hi,
When I use SystemJS builder.buildStatic to bundle my app and run it in browser, the application doesn't work and I see the below error on the console:
bundle.js:1 Uncaught Module ./item not present.
I am following the instructions mentioned on:
https://github.com/jelgblad/angular2-masonry
Everything works fine, if I don't create a bundle.
Can anyone please guide?