Modernizing the codebase #2044
timofei-iatsenko
started this conversation in
General
Replies: 1 comment
-
Thanks for bringing this up! It sounds like a great initiative. However, I'd like to wrap up the v5 release first (most likely without the Vue integration since there's still a lot of work to be done there), and then we can plan these changes for Lingui v6. Right now is a good time to deprecate things that don't work well in an ESM environment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I will use this issue as an Epic for ongoing work for modernizing Lingui codebase.
The goals of this Epic are:
Migrate to ES Modules
This is a challenging task because we are supporting babel macro plugin which is not supporting ES modules yet, and this blocks all used in this plugin dependencies to be migrated to ESM. (CJS modules could be imported from ESM modules, but ESM modules could not be imported from CJS synchronously). I started working on ground changes in the babel to support ESM in the babel-plugin-macros
This would be a major update with a breaking changes, because everyone who uses lingui internals from CJS context will not be able to do so after switching to ESM.
While we would be waiting for broader adoption of these changes in the babel & babel-plugin macros, I'm going to use
jiti
to provide CJS shim for ESM macro.Subtasks:
type: module
Migrate to Vite from Jest
Vite starts up much faster, needs less setup, and works well with ESM right away. While Jest has been popular for a long time, its many users make it hard to change things fundamentally without breaking existing setups. This has slowed down progress and made it tough to improve quickly.
Beta Was this translation helpful? Give feedback.
All reactions