ng-chartist: module is not compatible with rollup.js bundling and tree-shaking.
The current sample code does not cover the inclusion of the module/component via @NgModule app import.
This causes a problem for me as trying to import the ChartistModule (rather than importing the component at a page level as it used to be) results in the error Unexpected value ‘ChartistComponent’ exported by the module ‘ChartistModule’ , suggesting that I’m importing it incorrectly.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 30 (12 by maintainers)
Commits related to this issue
- refactor(src): combine module and component into one file Closes #48 Signed-off-by: Will Soto <will.soto9@gmail.com> — committed to willsoto/ng-chartist by willsoto 8 years ago
I’m currently working on a fix for this to hopefully avoid any extra configuration. For now, you can use workarounds obviously. I’ll mention something here once the fix is released.
On Tue, Oct 18, 2016 at 12:21 AM Christopher Cook notifications@github.com wrote:
I’m trying to reproduce the findings here. I’ve setup two identical Ionic projects with a minimal chartist setup one with the current apps-scripts using rollup and one with the beta apps-scripts using webpack.
Rollup: Regardless of
ionic serveorionic run androidI seebundle failed: 'ChartistModule' is not exported..This is a surprise as I think it should work without AoT compilation?! Adding the custom rollup config didn’t change anything. Webpack: Using webpack theionic serveworks fine and I can see the chart being displayed. Butnpm run build / ionic run androidstill issues the"Chartist Module is not exported"error.Anything screwed up in my simplified setup?`
Versions: ionic 2 Rc1 angular2-chartist@0.10.1 chartist@0.10.1 @types/chartist@0.9.33
home.ts
app.modules.ts
I’ll do my best to fix it tonight. Sorry for the trouble.
On Wed, Oct 19, 2016 at 9:48 AM Christopher Cook notifications@github.com wrote: