Adding custom webpack loaders to Ionic2



I’d like to customize a bit Ionic2 build. I can do that by changing webpack config. How should I proceed if I’d like to add additional webpack loader to a Ionic2 build?


  • Copy the stock one from node_modules/@ionic/app-scripts/config to the root of your project
  • Add "ionic_webpack": "./webpack.config.js" to the config stanza of package.json as documented here
  • Be prepared for it to break every time app-scripts is bumped, potentially requiring repeating these steps

Error when using Pubnub angular2 module in Ionic 2