Open Couiljer opened 1 year ago
same... needs to be fixed.
Same here
+1 :)
vite import also
Hi everyone,
If you update to Next 13.1, it now supports transpiling packages.
Here's how I have used this in my next.config.js
file:
module.exports = {
reactStrictMode: true,
transpilePackages: ["react-leaflet-cluster"],
};
Whilst I hope this gets fixed in the react-leaflet-cluster
package, it's good Next has identified this as a useful workaround for older packages or those that haven't been updated yet.
Yeah.. This is next issue. https://github.com/vercel/next.js/issues/19936 They fixed it in next 13, but i would rather wait to upgrading next in my app for obvious reasons. Do you guys plan to do something about it?
I had to work around this problem as Next.js did not transpile this package so I copied over the library locally, removed .css
files from the index.js
and then imported them in my _app.js
. Finally I changed the import to import from my local lib
directory.
I have same problem
Hi everyone,
If you update to Next 13.1, it now supports transpiling packages.
Here's how I have used this in my
next.config.js
file:module.exports = { reactStrictMode: true, transpilePackages: ["react-leaflet-cluster"], };
Whilst I hope this gets fixed in the
react-leaflet-cluster
package, it's good Next has identified this as a useful workaround for older packages or those that haven't been updated yet.
I try this suggest,
And my problem was solved
Hi there,
Is there a way to use this package within a NextJS app ? I cannot use it without receiving this error :
Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/react-leaflet-cluster/lib/index.js
thx