Import javascripts from node_modules packages


#1

Hi there,

I have the problem that I do not can import the bootstrap.js from my ember-cli-bootstrap-4 package within the ember-cli-build.js file and for minutes I found this: https://emberjs.com/blog/2017/09/01/ember-2-15-released.html#toc_app-import-files-within-node_modules

Is there a other possibility to import my needed scripts from this package? I use the current ember version 2.14 …

Greetings, Mario


#2

You can directly import from node_modules only if your app is running in ember 2.15. Looks like this addon (https://github.com/kellyselden/ember-cli-node-modules-to-vendor) might be helpful if you are sticking to 2.14 for now.

You may also want to read https://simplabs.com/blog/2017/02/13/npm-libs-in-ember-cli.html