WebPack: jquery + bootstrap-sass
See original GitHub issue- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Debian 8.5
- 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
- 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
- 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'
- Mention any other details that might be useful.
i try the way to add in main.ts
import $ from 'jquery';
orimport * as jQuery from 'jquery';
but nothing change.
Any ideas ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@choucry13 nope didn’t work.
For now i include jquery in index.html file and store it in public dir.
@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