Nwb: Import jquery with bootstrap

Created on 18 Feb 2017  路  5Comments  路  Source: insin/nwb

This issue is a:

  • [ ] Bug report
  • [ ] Feature request
  • [x ] Question / support request
  • [ ] Other

Hi can anyone tell me how import jquery with bootstrap? I'm doing this:

import 'jquery/dist/jquery.js';
global.jQuery = require('jquery');

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap/dist/js/bootstrap.js';

I'm already put jquery in externals in many ways like this:

"jquery": "jQuery",

But, nothing works. It keeps me giving this error: "Bootstrap's JavaScript requires jQuery".
What i am doing wrong?

Thanks

support

Most helpful comment

All 5 comments

Looks like ProvidePlugin is the way to go.

@insin I'm a bit new to all of this, how would I go about using ProvidePlugin with NWB to get this set up? I'm having the same problem currently...

@insin thank you so much! That's perfect.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ernieyang09 picture ernieyang09  路  3Comments

insin picture insin  路  6Comments

lachlanjc picture lachlanjc  路  3Comments

clayrisser picture clayrisser  路  3Comments

brumm picture brumm  路  6Comments