[current status]
I cannot get webpack build correctly with epicenter-js-libs. I manually put "epicenter-js-libs": "https://github.com/forio/epicenter-js-libs.git",
in package.json file. run npm install
. use require('Epicenter-JS-Libs')
(ant other path variants). Does not compile, telling me epicenter-js-libs module not found.
[/current status]
It will be much more convenient if forio has npm package for APIs.
I am using webpack, dependencies are through npm. I don’t know how to configure properly with webpack for CDN based js libs. My current work around is to put
in html.js. while all other dependencies are in npm. It is not ideal. Is there a proper way to add epicenter js in webpack?
Update 3:
I added a line into package.json file under epicenter’s node module, “main”: “dist/epicenter.js”,
“name”: “Epicenter-JS-Libs”,
“version”: “1.5.0”,
“main”: “dist/epicenter.js”,
“repository”: {
“type”: “git”,
“url”: “git+https://github.com/forio/epicenter-js-libs.git”
},
Now it compiles. However, when it runs, it spits error “src/managers/auth-manager.js:101
AuthManager.prototype = $.extend(AuthManager.prototype, {
^
ReferenceError: $ is not defined”
I have installed jquery separately, and import it in my js file. But it doesn’t matter, still the same error. Now I go back to use html src= as workaround. Hope get more help from you for using it as local module.
Update 2: see comment
Update 1: see comment