Using dynamic import() to code-split the application #4342
Replies: 1 comment 2 replies
-
The workaround you've listed: (e.g. a dynamic import of a component
I'd like to understand this more, what used to work that doesn't work anymore?
The optimization depends on what is making up that size. Are you duplicating styles between components (which can be fixed by sharing styles) or bundling large modules? |
Beta Was this translation helpful? Give feedback.
-
Which package(s) are affected?
Lit Core (lit / lit-html / lit-element / reactive-element)
Description
How to implement dynamic import in lit element. For example, I have more than 20 web components and I want to use lazy loading using dynamic import. How I will do?
Also, I need to know optimization technical for Some chunks are larger than 500 kBs after minification
Reproduction
I don't have working example to post here.,
Workaround
import('../../utils/mq-layout');
import('../common/load-indicator');
Is this a regression?
Yes. This used to work, but now it doesn't.
Affected versions
3.0.0
Browser/OS/Node environment
Node version v18.12.1
Beta Was this translation helpful? Give feedback.
All reactions