Reputation: 209
I want to use require.js in ionic 2. I uses something like
var createLogger = require('redux-logger');
var persistState = require('redux-localstorage');
However, the browser complaint about "Uncaught ReferenceError: require is not defined". I could not think of a way to include requirejs to my ionic 2 project. Please help.
Upvotes: 4
Views: 3335
Reputation: 441
I am also trying to integrate RequireJs with Ionic 2. For your problem try this
declare var require: any;
use it after all your imports and before @Component or @Service
Upvotes: 8