Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add jquery plugin in the provideplugin of the webpack #1037

Closed
alaa-bourouissi opened this issue Sep 27, 2016 · 9 comments
Closed

add jquery plugin in the provideplugin of the webpack #1037

alaa-bourouissi opened this issue Sep 27, 2016 · 9 comments

Comments

@alaa-bourouissi
Copy link

Hello , I want to add the jquery plugin in the webpack file , but I don't find where to add it ,

plugins: [
new webpack.ProvidePlugin({
'window.jQuery': 'jquery',
'window.$': 'jquery',
})
],

Where to add this code ???

@Martin-Luft
Copy link
Contributor

Martin-Luft commented Sep 27, 2016

The ng2-bootstrap is a project to provide Bootstrap widgets for Angular 2 without jQuery (widgets are written in Angular 2). So please do not include jQuery!

@alaa-bourouissi
Copy link
Author

So how can I add plugins in my app ??

@Martin-Luft
Copy link
Contributor

What kind of plugins?

@alaa-bourouissi
Copy link
Author

@Martin-Luft
Copy link
Contributor

Then you should use Bootstrap with jQuery. We can't provide support for webpack with Bootstrap and jQuery in this project because it is offtopic. Please ask the webpack, Bootstrap or jQuery guys.

@valorkin or do you think differently about?

@alaa-bourouissi
Copy link
Author

alaa-bourouissi commented Sep 27, 2016

I found the solution for using jQuery with angular 2 but I would like to know where can I add this code : plugins: [
new webpack.ProvidePlugin({
'window.jQuery': 'jquery',
'window.$': 'jquery',
})
],

I get it from (drgullin/icheck#322) , the webpack.config.js is complicated to understand

@Martin-Luft
Copy link
Contributor

Then add it to your webpack config? Do you have a webpack project?

@alaa-bourouissi
Copy link
Author

yes , but I just tell you I don't know or I don't find where to add it , there is many files related to the webconfig.ts

@Martin-Luft
Copy link
Contributor

Please understand that your question is a webpack related and not ng2-bootstrap related... Do you have a webpack.common.js file? Add the plugin inside the plugins list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants