0

I'm using ES6 syntax to import stuff into my app.js browserify file like so:

import $ from 'jquery';
import Bootstrap from 'bootstrap-sass';

And still, I'm getting the following error:

bundle.js:3 Uncaught Error: Bootstrap's JavaScript requires jQuery

When I check bundle.js file, both the Bootstrap JS and jQuery are in there but in different order (Bootstrap always comes first). I tried switching them around when loading, but still the same result.

Any ideas?

Bravi
  • 713
  • 2
  • 8
  • 29

1 Answers1

0

You have to load first jquery library and then load bootstrap library. Also check that you have used latest jquery library.

If still the same errors there : Then it might be conflict with other jQuery library.

Bhavin Solanki
  • 4,740
  • 3
  • 26
  • 46
  • That's what I'm trying to achieve. So how should I load jquery first? These are the only 2 libraries I'm loading at the moment – Bravi Aug 14 '15 at 20:02