Last active
December 30, 2016 10:06
-
-
Save mihkels/9620edf7fd6ca9e4de853ae5fff68f75 to your computer and use it in GitHub Desktop.
Browserify ES6 importing Bootstrap JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Importing jQuery in ES6 style | |
import $ from "jquery"; | |
// We need to expose jQuery as global variable | |
window.jQuery = window.$ = $; | |
// ES6 import does not work it throws error: Missing jQuery | |
// using Node.js style import works without problems | |
require('bootstrap'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment