Open Rambuto opened 7 years ago
Since you are using angular2 I assume you are loading the script via SystemJS. SystemJS detects the library to be in commonjs format. But the imports for that format seem to be broken. To workaround you can force SystemJS to load the script in amd format:
meta: {
"jspm_packages/npm/dsmorse-gridster@0.7.0/jquery.gridster.js": {
"format": "amd"
}
}
That worked for me, but the imports for commonjs should be fixed nevertheless.
My problem what I using webpack and this import don't working for me :(
If you have a code change I'd be happy to accept it, but for the record, there are VERY good (if not better) angular versions of this library. I'd recommend leveraging one of those directly.
I find solution. I copy folder src from github to my project. But this very bad solution. And i want ask you add to npm folder src with all file which you use for library Because all project based on ES6/typescript will try import library which not exist in dist folder.
This list import which code can't find
Thank you
utils.js and other files are indeed not included in the npm install.
Same issue here (Typescript, SystemJS), any plans to resolve this?
same here
I think have next solution:
I have the same problem!
Hi, i have problem when try import library like this import 'dsmorse-gridster/dist/jquery.gridster.min.js' In console i have next error:
Problem have because in code have part which try add library if current library was imported.
In library part this is next code if (typeof exports === 'object') { module.exports = factory(require('jquery'), require('./jquery.draggable.js'), require('./jquery.collision.js'), require('./jquery.coords.js'), require('./utils.js')); } Can you fixe it please. This urgent for me :) Thks And sorry for my bad english.