shakacode / bootstrap-loader

Load Bootstrap styles and scripts in your Webpack bundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery(...).tooltip is not a function

mahisha opened this issue · comments

I am trying to integrate bootstrap-loader in https://github.com/AngularClass/angular-starter but not able to make it work.

  • Installed required NPM packages
    npm install --save-dev bootstrap-loader bootstrap-sass css-loader node-sass resolve-url-loader sass-loader style-loader url-loader jquery @types/bootstrap @types/jquery
  • Added webpack.ProvidePlugin entry in plugins
  • Added bootstrap-loader entry point
  • Trying to make Bootstrap Tooltip work

But I am getting following error
ERROR TypeError: jQuery(...).tooltip is not a function

My Repository : https://github.com/mahisha/angular-starter-bootstrap
My Commit : https://github.com/mahisha/angular-starter-bootstrap/commit/6ae501c88371d291f6b4bee07221310c8b5f072d
Demo URL : https://mahisha.github.io/angular-starter-bootstrap/

Not able find what went wrong. Please help me in this. Thanks in advance.

@mahisha you don't have jQuery loaded in the browser properly.

@justin808 If you check my repository, when I followed the given procedure some how both

  • bootstrap bundle and
  • main bundle
    have jQuery library included.

I also tried adding some console log statements in jQuery.js files and found it is loading twice.

I guess we should have only one jQuery library included in generated bundles. Not sure where the problem is. Could you please help me in debugging this issue further, or any other suggestions to prevent loading jQuery twice.

@mahisha If you want personalized help on this, please consider our ShakaCode Pro Support Plan.

@justin808 Thanks for quick reply. I will definitely look into your Pro Support Plan.