I have been trying hard to get primeui working using the SystemJS module loader. I have documented my efforts in this thread.
I tried using AMD and CJS module formats.
Importing primeui in AMD format results in the following error:
Unhandled rejection (SystemJS) Multiple anonymous defines in module http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js
Error: Multiple anonymous defines in module http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js
at eval (http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js:274:9)
at eval (http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js:285:2)
at eval (http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js:14801:3)
at eval (<anonymous>)
at r (http://localhost:9000/jspm_packages/npm/bluebird@3.4.1/js/browser/bluebird.min.js:33:7722)
at i._settlePromiseFromHandler (http://localhost:9000/jspm_packages/npm/bluebird@3.4.1/js/browser/bluebird.min.js:32:13044)
at i._settlePromise (http://localhost:9000/jspm_packages/npm/bluebird@3.4.1/js/browser/bluebird.min.js:32:13847)
at i._settlePromise0 (http://localhost:9000/jspm_packages/npm/bluebird@3.4.1/js/browser/bluebird.min.js:32:14548)
Evaluating http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js
Error loading http://localhost:9000/jspm_packages/npm/primeui@4.1.15/primeui.js as "npm:primeui@4.1.15/primeui.js" from http://localhost:9000/jspm_packages/npm/primeui@4.1.15.js
Importing primeui in CJS format works fine but no widget factories are invoked. When I invoke the imported module manually, only the last factory is invoked of the list of widget factories listed in sequence in primeui.js. This is because the module.exports is overwritten each time.
I got primeui working in a non-modular environment using browser globals. So maybe I am overlooking something but I have no idea how this is supposed to work in a modular setup.
I have been trying hard to get primeui working using the SystemJS module loader. I have documented my efforts in this thread. I tried using AMD and CJS module formats.
Importing primeui in AMD format results in the following error:
Importing primeui in CJS format works fine but no widget factories are invoked. When I invoke the imported module manually, only the last factory is invoked of the list of widget factories listed in sequence in primeui.js. This is because the
module.exports
is overwritten each time.I got primeui working in a non-modular environment using browser globals. So maybe I am overlooking something but I have no idea how this is supposed to work in a modular setup.
Thanks for any pointers.