jvandemo / jvandemo/generator-angular2-library
No name was provided for external module in rollup:umd task
- Dominant language
- JavaScript
- Stars
- 740
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
I am getting these 'errors' when I run 'npm run build'. They seem to be warnings as everything works when I use the library but I would like to fix these.
No name was provided for external module '@angular/core' in options.globals - guessing 'core'
No name was provided for external module '@angular/common' in options.globals - guessing 'common'
No name was provided for external module '@angular/router' in options.globals -guessing 'router'
No name was provided for external module 'rxjs/Observable' in options.globals -guessing 'Observable'
No name was provided for external module 'rxjs/Subject' in options.globals - guessing 'Subject'
No name was provided for external module '@angular/platform-browser' in options.globals - guessing 'platformBrowser'
No name was provided for external module '@angular/forms' in options.globals - guessing 'forms'
Can anyone give me guidance?
Here is what my complete gulp task looks like. I changed the task a little as rollup was warning me of some config changes:
gulp.task('rollup:umd', function () {
return gulp.src(`${buildFolder}/**/*.js`)
// transform the files here.
.pipe(rollup({
// Bundle's entry point
// See "input" in https://rollupjs.org/#core-functionality
input: `${buildFolder}/index.js`,
// Allow mixing of hypothetical and actual files. "Actual" files can be files
// accessed by Rollup or produced by plugins further down the chain.
// This prevents errors like: 'path/file' does not exist in the hypothetical file system
// when subdirectories are used in the `src` directory.
allowRealFiles: true,
// A list of IDs of modules that should remain external to the bundle
// See "external" in https://rollupjs.org/#core-functionality
external: [
'@angular/core',
'@angular/platform-browser',
'@angular/common',
'@angular/forms',
'@angular/router',
'rxjs/Observable',
'rxjs/Subject'
],
output: {
// Format of generated bundle
// See "format" in https://rollupjs.org/#core-functionality
format: 'umd',
// Export mode to use
// See "exports" in https://rollupjs.org/#danger-zone
exports: 'named',
// The name to use for the module for UMD/IIFE bundles
// (required for bundles with exports)
// See "name" in https://rollupjs.org/#core-functionality
name: 'vueframework',
// See "globals" in https://rollupjs.org/#core-functionality
globals: {
typescript: 'ts'
}
},
}))
.pipe(rename('vueframework.umd.js'))
.pipe(gulp.dest(distFolder));
});
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.