-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
How do I include jquery in this setpu? #981
Comments
import $ from 'jquery'; npm i -S jquery |
Thank you :) Iam going to try that. Maybe a bit of a stupid question but how can I use less and compile it easily. |
After doing what you advised me I'll get this error: |
@smgjreinieren
Which version of jQuery did you install? Importing it like this will only work with 2.x and later. If you still have issues can you please provide a project reproducing it?
Just like you'd normally do: run Less command-line tool, and it will create a CSS file. Import that file like the user guide suggests. |
@gaearon this is what is in my package.json: Thereby I allready have an bootstrap setup with gulp file to compile less but I dont know how to combine this with each other.. |
Please provide a project reproducing the problem. |
@gaearon Do you have suggestions where I can reproduce it? |
I mean: if you have any issues, please publish your project on GitHub so I can take a look. |
@gaearon what I want to try is to combine these two project setups: https://github.com/smgjreinieren/React-bootstrap |
@smgjreinieren Before I clone the repo, please can you tell what the issue is? Are you still seeing this: #981 (comment)? Or is there another problem? |
@gaearon Nope allready fixed that but I want to use custom bootstrap with this setup. Not related to this issue maybe you could help me out |
@smgjreinieren you don't need gulp to use less with create-react-app, you can just create another npm scripts inside package.json for example, run and change your script section in package.json to
run it with I'm not really familiar with less command line tooling, I personally use sass ported bootstrap with node-sass because it has built it watch support (I use nodemon in above example, haven't really tested that). |
whoops, saw the title. it's already out of topic. It's better to put your question in Stack Overflow |
You can put any command in "compile-bootstrap": "node scripts/compile-bootstrap.js" Then you can write Since the original issue is solved, I'll close this one. Cheers! |
@gaearon How do you mean that? Iam not understand the new line clearly in package.json.. I tried to include the main.css and main.js in my index.html like this: but it seems not to find that styling.. What do you mean with write custom script what will it do? |
Does the user guide help? You can use either way. |
@gaearon That is really usefull thanks, |
I am also having an issue with jquery, similar to the one mentioned above. I imported a later than 2.x version and imported with |
@faurenlarr Could you please provide a project reproducing the problem? It would also be great if you could file a separate issue because it’s hard to keep track of (usually unrelated) problems in old issues. Thanks! |
I want to use jqeury in my app.jsx but how do I include this to use?
The text was updated successfully, but these errors were encountered: