-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Which package(s) are affected?
Localize (@lit/localize)
Description
Hi there 👋,
Thanks for all the wonderful work! I noticed a little something:
lit-localize.js and init/*.js have an import loop.
There is already a comment to drop the lines:
https://github.com/lit/lit/blob/abf30b3e895ea5d833f6d9559612e2b1ba47580d/packages/localize/src/lit-localize.ts#L15C1-L22C37
However, the comment is only regarding the bundle size, not the import loop.
Reproduction
I noticed this while using a post-processors, that traverses imports. It's much too complicated to set up, but you can simply check the imports manual and verify the issue:
https://github.com/search?q=repo%3Alit%2Flit+import+%7B_installMsgImplementation%7D+from+%27..%2Flit-localize.js%27%3B&type=code
Workaround
I used esbuild to bundled it. Most bundlers will ignore the loop.
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
latest
Browser/OS/Node environment
OS independent issue.
Potential solutions
- Remove the code, that's marked for deprecation (clean, but risky).
- Move the
_installMsgImplementationinto a separate file (safe).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status