Hey, thanks for the help This is what I ended up doing: I added this line to the webpack.config.js file:
module.exports = { entry: [ path.resolve('bower_components/ionic-platform-web-client/dist/ionic.io.bundle'), ......
By doing this I didn't need to reference the .js in index.html since it is already being packed in the app.bundle.js. But I did comment out in index.html where the cordova.js is included, since it says cordova is bootstrapped in ionic-platform-web-client
. So far so good, ionic.io.bundle is being imported, I then ran the ionic io init
and tried to serve the app. Blank screen. Console says Uncaught TypeError: Cannot read property 'get' of undefined (app.bundle.js:4493)
. By looking at the source code it is clearly related to the ionic.io.bundle. I found people with the same issue here https://github.com/driftyco/ionic-platform-web-client/issues/4 and here https://github.com/driftyco/ionic-platform-web-client/issues/10, but unfortunately their solution won't work. I tried editing ionic.io,bundle to add the code
"IONIC_SETTINGS_STRING_START";
var settings = {
"dev_push": true
};
return {
get: function(setting) {
if (settings[setting]) {
return settings[setting];
}
return null;
}
};
"IONIC_SETTINGS_STRING_END";
But now I get a new error Uncaught TypeError: _settings.Settings is not a function (app.bundle.js:4762)
This is the line where I get the error: var settings = new _settings.Settings();
, in context:
var _settings = require("./settings");
....
var settings = new _settings.Settings();
Any idea where should I go from here? this ./settings
is not being imported correctly, how do I find it?
Thank you