The globalName option must be set for full-tree rollup global and UMD builds

127 views Asked by At

I have generated FountainJS angular2 project and write some code. I am using SystemJs with JSPM and TypeScript. Everything seems to work, but when i want build my project to dist, then gulp-task 'systemjs' throws me the error 'Error: The globalName option must be set for full-tree rollup global and UMD builds.', i wonder what can cause the error. I tried many things, but i am not able to find out the reason. Anyone had similar issue and knows the solution?

1

There are 1 answers

0
S.Greczyn On BEST ANSWER

I found issue and solution for that error.

The main cause was this line:

import {BootstrapModalModule} from "angular2-modal/plugins/bootstrap";

I didn't noticed in docs of angular2-modal that i have to add some additional configs to systemjs.config file:

inside packages section:

'angular2-modal': {
     defaultExtension: 'js'
     main: 'bundles/angular2-modal.umd'
},
'angular2-modal/plugins/bootstrap': {
     defaultExtension: 'js',
     main: `bundles/angular2-modal.bootstrap.umd`
}

inside map section:

'angular2-modal/plugins/bootstrap': 'npm:[email protected]/bundles/angular2-modal.bootstrap.umd'