question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebPack: jquery + bootstrap-sass

See original GitHub issue
  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Debian 8.5
  2. Versions. Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.11-webpack
node: 6.2.2
os: linux x64
  1. Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

npm install --save jquery npm install --save bootstrap-sass

now in pollyfils.ts add:

import 'jquery';
import 'bootstrap-sass/assets/javascripts/bootstrap';

ng serve

  1. The log given by the failure. Normally this include a stack trace and some more information. in bundled js, i can find jquery lib, but in console i get 'Error: Bootstrap's JavaScript requires jQuery'
  2. Mention any other details that might be useful. i try the way to add in main.ts import $ from 'jquery'; or import * as jQuery from 'jquery'; but nothing change.

Any ideas ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Daredzikcommented, Aug 10, 2016

@choucry13 nope didn’t work.

For now i include jquery in index.html file and store it in public dir.

1reaction
choucry13commented, Aug 10, 2016

@Daredzik try this : npm install --save @types/jquery npm install --save jquery use import * as jQuery from ‘jquery’ in your typescript file. @types works with the typescript@2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack - Bootstrap
Learn how to include Bootstrap in your project using Webpack 3. ... to add both of them to your package.json using npm install...
Read more >
How to include Bootstrap in your project with Webpack
Installing Bootstrap. Use the following command to install Bootstrap and its peer dependencies, jQuery and Popper: $ npm install ...
Read more >
How to install and use Bootstrap, jQuery and popper.JS with ...
Create a webpack.config.js file if you haven't created yet. The bootstrap 4.6 uses sass and by assuming this, we have set up our...
Read more >
GitHub - shamin/webpack-sass-bootstrap-boilerplate
This Webpack Sass Bootstrap boilerplate starter contains the features and scripts you need to get started quickly with Webpack bundling and building, Live ......
Read more >
Configure Webpack To Compile Bootstrap - kimserey lam
For the sass code, it is also available per module and can be compiled with overwrite of ... npm install bootstrap jquery popper.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found