I am getting the following error when trying to use rollup to bundle my app which is using the Angular report viewer module:
? 'ReportViewer' is not exported by node_modules\@progress\telerik-angular-report-viewer\dist\dependencies\telerikReportViewer.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules\@progress\telerik-angular-report-viewer\dist\es\telerik-report-viewer.component.js (6:9)
4: window.jQuery = jquery;
5: import '../dependencies/telerikReportViewer.kendo-2016.3.914.min';
6: import { ReportViewer } from '../dependencies/telerikReportViewer';
^
7: var TelerikReportViewerComponent = /** @class */ (function () {
8: function TelerikReportViewerComponent() {
I followed the link in the error description but am not sure what to put in the commonjs section of rollup.config (if this is the issue), this didn't seem to do anything:
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: 'node_modules/**',
namedExports: {
'chart.js': ['Chart'],
'@progress/telerik-angular-report-viewer': ['ReportViewer']
},
}),
uglify()
]