Javascript 汇总不';angular2忙碌时不会成功;BusyModule';不是由…/index.js导出的
AOT生成成功,但汇总步骤失败:Javascript 汇总不';angular2忙碌时不会成功;BusyModule';不是由…/index.js导出的,javascript,rollupjs,Javascript,Rollupjs,AOT生成成功,但汇总步骤失败: 'BusyModule' is not exported by node_modules\angular2-busy\index.js ... 34: import { BusyModule } from 'angular2-busy'; ^ index.js: export * from './build/index'; build/index.js: "use strict"; function __export(m) {
'BusyModule' is not exported by node_modules\angular2-busy\index.js
...
34: import { BusyModule } from 'angular2-busy';
^
index.js:
export * from './build/index';
build/index.js:
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./busy.module"));
__export(require("./busy.directive"));
__export(require("./busy.service"));
__export(require("./busy-config"));
rollup-config.js:
export default {
entry: 'src/main-aot.js',
dest: 'dist/build.js',
sourceMap: false,
format: 'iife',
onwarn: function(warning) {
...
},
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: [
'node_modules/**'
]
})
]
}
我尝试使用namedExports:
namedExports: {
'node_modules/angular2-busy/build/busy.module.js': [ 'BusyModule' ]
}
没有运气:
? Duplicate export 'BusyModule'
node_modules\angular2-busy\build\busy.module.js (87:26)
85: export { busy_module_2 as createJitCompiler };
86: var busy_module_3 = busy_module.BusyModule;
87: export { busy_module_3 as BusyModule };
^
有人知道怎么处理吗
谢谢