-
Notifications
You must be signed in to change notification settings - Fork 37
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
Global CSS cannot be imported from within node_modules (next js) #6
Comments
@junjou The maintainers of nextjs planning to allow CSS imports from node_modules. I hope the error will be gone. I'll follow the PR and test it when it is merged. |
Is this still not fixed @akursat or any workaround? |
@koeit Please follow the discussion vercel/next.js#27953 possible workaround |
+1 |
upvote! :-) |
Does anyone found some solution? Can you share the code if "yes"? |
@StrangersSoftware use this library - https://github.com/bem/next-global-css adjust your
|
@junjou @r1skz3ro @StrangersSoftware @SublimeProphets @bsor-dev @koeit The addressed problem should be gone with the new version. Please give it a try and let me know if you still encounter a problem. |
@akursat Currently using the version 2.1.0 and still facing this issue.
Let me know if I can help you provide any other information. |
I believe the file https://github.com/akursat/react-leaflet-cluster/blob/main/src/index.tsx should not import
nor
And instead the documentation of 'react-leaflet-cluster' should be changed, so that people import these css files themselves. Let me know your thoughts! Thanks |
The new version still gives me the same error on Next.js. I solved this by using your index.tsx file as one of my components and added all styles in my projects global css-file. Thanks for your plugin! |
Add this to the next.config.js file: |
This worked for me 👍 |
@luiskurihara and make sure you use dynamic import for the component with leaflet inside import dynamic from 'next/dynamic'
const MapApp = dynamic(() => import('@/components/ReactLeafletMap'), { ssr: false }) |
Hello,
Seems like it can't work with nextjs:
The text was updated successfully, but these errors were encountered: