Can't use external npm module with rollup.js


Rollup doesn’t let you build if using an npm module that doesn’t support AoT compiling, which seems to be all of the ones I try :wink:

ionic serve works because it’s not using AoT compiling.

This seems to be an issue with ngc in the ionic build script, here’s the error I get:

ngc: Error: Unexpected value 'DynamicComponentModule' imported by the module 'AppModule'

I’m using a normal import:

import {DynamicComponentModule} from 'angular2-dynamic-component/index';
imports: [

It might be related to this issue, not sure:

Does anyone have a solution for this, or know how to disable this feature in rollup so I can at least build for prod without errors?