Closed n4uoase closed 7 years ago
I've never used rollup, but maybe it doesn't like
exports.PasswordStrengthBarModule = require('./lib/passwordStrengthBar.module').PasswordStrengthBarModule;
and you need to use Custom named exports?
Hi @rnadler,
to fix this problimt while rolling-up the project I had to adopt the rollup-config.js section within plugins. Had to add the following lines in the plugins array [] which looks like this: [don't worry about the other modules, they lead to issues too :-)]
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: [
'node_modules/**'
],
namedExports: {
'node_modules/angular-modal-gallery/dist/bundles/angular-modal-gallery.umd.js': ['ModalGalleryModule'],
'node_modules/angular2-logger/core.js': ['Logger', 'Options'],
'node_modules/angular2-dropzone-wrapper/dist/index.js' : ['DropzoneModule'],
'node_modules/angular2-datatable/lib/DataTableModule.js' : ['DataTableModule'],
'node_modules/angular-modal-gallery/dist/bundles/angular-modal-gallery.umd.js' : ['Image','ModalGalleryModule']
}
}),
uglify()
]
After compiling my app with AOT I'm going through the process of tree-shakin my bundle. But when I start
node_modules/.bin/rollup -c rollup-config.js
after a few seconds the systems quits with the following error message:Any ideas how to fix this? Thanks in advance. OASE