angular-rollup-starter
angular-rollup-starter copied to clipboard
How to include 3rd party libs
How to include 3rd party libs like ng2-translate, ng2-material and others? After adding module to vendor.ts and build i have errors. Inside your files i added: vendor.ts
import {TranslateModule} from 'ng2-translate/ng2-translate';
export default {
TranslateModule,
}
build.ts
globals:{
'ng2-translate/ng2-translate': 'vendor.TranslateModule'
}
external: [
'ng2-translate/ng2-translate'
]
I fixed it import * as _angular_translate from 'ng2-translate/ng2-translate';
default as _angular_translate,
build globals as 'ng2-translate/ng2-translate': 'vendor._angular_translate' and external 'ng2-translate/ng2-translate'
But I can't configure ng2-auto-complete the same way and I don't know why
with npm run serve it is working but after this configuration I have this error with npm run roll compile error: Error: Could not resolve '../../../src/translate.service'
https://github.com/rollup/rollup-plugin-inject