Loading bootstrap via ember-cli-build.js not working

In my project if I include bootstrap’s javascrpt file via

app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.min.js'); in ember-cli-build.js I get a bunch of js errors and the pages don’t render.

If instead I include it in index.html it works fine. Any idea what could be causing this?

Error-

SyntaxError: export declarations may only appear at top level of a module

We needed to include popper.js just prior to bootstrap.

I’ve got popper just before bootstrap too. Still doesn’t seem to work.

If you only need bootstrap css or fonts you can switch to NPM with ember-cli-bootstrap-css and ember-cli-bootstrap-fonts. Or ember-bootstrap if you also need bootstrap.js. I don’t invest time in Bower solutions because Ember is slowly deprecating Bower.

2 Likes

and we can use ‘node_modules’ in 2.15+ at last :slight_smile:

1 Like