Hey there,
I've tried to import jsPDF into my Ember App but sadly without any success :/
Are you using the latest version of jsPDF?
"version": "1.3.2"
Steps to reproduce
I have importet jspdf.debug.js like described at https://guides.emberjs.com/v2.0.0/addons-and-dependencies/managing-dependencies/#toc_globals-provided-by-javascript-assets
app.import('bower_components/jspdf/dist/jspdf.debug.js');
What I saw
Uncaught Error: an unsupported module was defined, expected define(name, deps, module) instead got: 1 arguments to define
I've tried to extend the define() call in jspdf.debug.js but it seems that I'm doing it at the wrong place...
`
jsPDF.API = { events: [] };
jsPDF.version = "1.3.2 2016-09-30T20:33:17.116Z:jameshall";
if (typeof define === 'function' && define.amd) {
// INFO: I've added [] to the call down here
define('jsPDF', [], function () {
return jsPDF;
});
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = jsPDF;
} else {
global.jsPDF = jsPDF;
}
return jsPDF;
`
Any help would be highly appreciated.
Cheers,
Michael
Hey there,
I've tried to import jsPDF into my Ember App but sadly without any success :/
Are you using the latest version of jsPDF?
"version": "1.3.2"Steps to reproduce
I have importet jspdf.debug.js like described at https://guides.emberjs.com/v2.0.0/addons-and-dependencies/managing-dependencies/#toc_globals-provided-by-javascript-assets
app.import('bower_components/jspdf/dist/jspdf.debug.js');What I saw
Uncaught Error: an unsupported module was defined, expected define(name, deps, module) instead got: 1 arguments to defineI've tried to extend the define() call in jspdf.debug.js but it seems that I'm doing it at the wrong place...
`
`
Any help would be highly appreciated.
Cheers,
Michael