-
Notifications
You must be signed in to change notification settings - Fork 385
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
fix(experimental-extractor): fix various bugs #1958
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
- update esbuild to 0.21.5 - apply lingui macro on each file as esbuild plugin - remove buildExternalizeFilter in favour of `{packages: external}`
00d0b9c
to
6a55012
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Very similar to what I ended up doing! Will try this out once it's released. Alongside the rewrite to not use babel-plugin-macros, I think things will be in a much better place. |
- update esbuild to 0.21.5 - apply lingui macro on each file as esbuild plugin - remove buildExternalizeFilter in favour of `{packages: external}`
Well, any plan to release a latest next version? |
@yunsii I was planning to prepare the |
Hi @yunsii, the v5.0.0-next.0 is here 🙂 |
I will test it on next week 👌 |
Unfortunately it broken with type syntax like: export const getStaticProps: GetStaticProps = async ctx => { Reproduction: https://github.com/yunsii/lingui-examples-nextjs-swc-1797/tree/lingui-next It works after I remove all type syntax 😂 |
Thanks for reporting, I use TS files in e2e test fixtures but none of them really has anything TS related 🤦♂️ |
Great, it works after I patched package. It seems thant we can migrate from |
You can use an automatic codemod I prepared to migrate imports, https://github.com/lingui/codemods?tab=readme-ov-file#split-macro-imports And yes, @lingui/swc-plugin is compatible. |
@lingui/[email protected] is not compatible [email protected] with babel plugin is okey, commit: yunsii/lingui-examples-nextjs-swc-1797@d6b0a19 |
But it still extracted. Reproduction: yunsii/lingui-examples-nextjs-swc-1797@8d3a70d |
My mistake, if you asking about split macro import feature, it's already ported to SWC plugin, but not released yet. So, yes, in terms of new imports, version 4 of swc plugin is incompatible. |
Good catch, please create a separate issue, i will take a look. |
New issue: #1974 |
{packages: external}
Description
Implementing ideas from this comment: #1797 (comment)
Types of changes
Fixes # (issue)
Checklist