Nextjs Extra Compiled Module #2528
Unanswered
laurent512
asked this question in
Q&A
Replies: 2 comments 5 replies
-
I think this should help a lot: https://lucide.dev/guide/packages/lucide-react#with-dynamic-imports |
Beta Was this translation helpful? Give feedback.
4 replies
-
Any intention to solve that? :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
It seems that adding the icons file as it is written in the doc (link below) increase by a huge amount the compiled modules during development.
https://platejs.org/docs/components/installation/next
That slows down the compilation process during development massively . (~2500 extra modules in my project because of that)
Is there a way to rewrite that to avoid this situation?
I already added the following in next.config.js which improved a lot but not enough :
module.exports = withNextIntl({
// Other Next.js configuration ...
experimental: {
serverActions: true,
},
modularizeImports: {
'lucide-react': {
transform: 'lucide-react/dist/esm/icons/{{ kebabCase member}}'
}
}
});
Thank you so much in advance
Beta Was this translation helpful? Give feedback.
All reactions