Closed adisreyaj closed 4 years ago
@adisreyaj Maybe you can try this work-around:
import { init } from 'echarts';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
NgxEchartsModule.forRoot({
echarts: {
init,
},
})
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
This actually worked.
So basically it has something to do with the module resolution when using the import * as echarts from 'echarts'
style...right?
I don't think this issue should have been closed. The workaround is not a proper solution, it's a ... workaround.
When serving the application the charts are rendered properly without any issues. But when production build is done (`ng build --prod) and we run the application the charts are not being rendered all the divs are just empty.
Configuration:
When I try building without
prod
flag, the charts are working fine. I suppose it has do something with the AOT compilation.