-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Unexpected token 'export' with dynamicIconImports #1534
Comments
Same issue here |
Same issue here, waiting for this to be fixed before we can update to newer versions 🤞 |
same here |
Hi, thanks for reporting the issue @bightg30098 @JulioCVaz @vsnthdev @hrithikmotto The entire file should look something like this for the provided repository: /** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: ['lucide-react']
}
module.exports = nextConfig You can find more infos about that in the NextJS documentation @ericfennis can we just close the issue or is this something that should be added to the documentation? I'm not a React dev so I can't really tell if that's the best solution but it fixes the issue from the provided repo for me. |
@JanTrichter Let me try the mentioned solution and see if this works. If it works, then I guess we can add this to the dynamic imports docs and close this issue. |
I can confirm the issue gets resolved by #1534 (comment) ✅ |
I'll add a note to the docs when I find the time. If anyone else wants to provide a PR for that please do so! |
Since the solution that is provided here seems to work and there is a PR to update the docs we can close this issue @ericfennis. |
the same problem is present during tests (Jest) |
@melrose13-69 you should switch to running jest with Esmodule support |
Prerequisites
Step to reproduce
git clone https://github.com/bightg30098/lucide-next-dynamic-import cd lucide-next-dynamic-import pnpm i pnpm dev
Actual behavior
Any message or error
Resources
Here is what a great bug report would look like:
The text was updated successfully, but these errors were encountered: