2017-01-25 58 views
1
'DragulaModule' is not exported by node_modules\ng2-dragula\index.js 
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module 
app\app.module.js (13:9) 
11: import { BrowserModule } from '@angular/platform-browser'; 
12: import { AppComponent } from './app.component'; 
13: import { DragulaModule } from 'ng2-dragula'; 
      ^
14: import { FileUploadModule } from "ng2-file-upload"; 

rollup.config.js'DragulaModule' 沒有出口的node_modules NG2-dragula index.js

import rollup  from 'rollup' 
import nodeResolve from 'rollup-plugin-node-resolve' 
import commonjs from 'rollup-plugin-commonjs'; 
import uglify  from 'rollup-plugin-uglify'; 

export default { 
    entry: 'app/main.js', 
    dest: 'dist/build.js', 
    sourceMap: false, 
    format: 'iife', 
    plugins: [ 
     nodeResolve({jsnext: true, module: true}), 
     commonjs({ 
     include: 'node_modules/rxjs/**', 
     }), 
     uglify() 
    ] 
} 

使用匯總樹搖動,並在成功生成構建給我的上述錯誤文件與AOT。任何建議非常感謝。

回答

相關問題