Closed n4uoase closed 7 years ago
After fiddling around with rollup.js, I've figured that my rollup-configurations were wrong. Here is the working rollup-config.js (remove DataTableModule from namedExports and in include 'node_modules/**'):
import rollup from 'rollup';
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
//paths are relative to the execution path
export default {
entry: 'src/main.js',
dest: 'aot/dist/build.js', // output a single application bundle
sourceMap: true,
sourceMapFile: 'aot/dist/build.js.map',
format: 'iife',
onwarn: function(warning) {
// Skip certain warnings
// should intercept ... but doesn't in some rollup versions
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
// console.warn everything else
console.warn( warning.message );
},
plugins: [
commonjs({
include: 'node_modules/**',
namedExports: {
'node_modules/angular-modal-gallery/dist/bundles/angular-modal-gallery.umd.js': ['ModalGalleryModule', 'Image'],
'node_modules/angular2-logger/core.js': ['Logger', 'Options'],
'node_modules/angular2-dropzone-wrapper/dist/index.js' : ['DropzoneModule'],
'node_modules/ng2-bs3-modal/ng2-bs3-modal.js' : ['ModalComponent']
}
}),
nodeResolve({jsnext: true, module: true})
uglify()
]
}
Hi! I am using this module for a project. I am following the Angular Cookbook ( https://angular.io/docs/ts/latest/cookbook/aot-compiler.html ) for AOT-compiling. An error occurs when I'm executing following command:
"node_modules/.bin/rollup" -c rollup-config.js
Error Message:Here's my rollup-config.js File:
Maybe somebody can help me solve this problem? Thank you in advance!