-
Notifications
You must be signed in to change notification settings - Fork 754
Importing node_modules #879
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
Comments
Hi @Skill-Zozo , |
I was trying to add this slider (https://github.com/react-component/slider) to my project. After installing it, through
And then after importing the css file (associated with the slider I am importing), I had to include |
That's odd @Skill-Zozo. Usually, you simply need to import it as any other module: Did you correctly import the application pack into your layout? Is your parent component located inside the folder mentioned in |
Yes and yes. To test if I didn't do something wrong, I cloned @BookOfGreg's react-rails example (https://github.com/BookOfGreg/react-rails-example-app). |
I believe you should try to follow only the indications from The issue could come from @BookOfGreg's Then after you set up everything, simply |
I am running into the same issue. I followed the getting started section but wasn't able to import modules from node_modules |
The issue is webpacker's default babel config. This default config does not allow for node_modules to be imported and the culprit being this particular configuration
|
Going to close this to cleanup open discussions. |
Hi,
Can we add a section in the readme on how to import modules? It was not obvious to me and was rescued by @gauravtiwari's comments on here rails/webpacker#446 and #413. I think it could benefit future first timers to know how to import node modules. I certainly believe it is worth mentioning in the readme that the default babel configuration does not allow one to import npm modules
The text was updated successfully, but these errors were encountered: