noaignite / create-ignite-app

Boilerplate for React with Next.js and MUI
17 stars 2 forks source link

Migrate from babel to SWC #79

Closed alexanderflink closed 2 weeks ago

alexanderflink commented 1 year ago

Did a quick test and this should be quite easy. The Next SWC plugin now has support for emotion (along with importMap). We just need to write a rust SWC plugin that replaces the usage of babel-plugin-i18n-tag-translate. I think the only feature we use of that plugin is to replace __translationGroup with the current filename.

This update wouldn't bring any new features except for a speed improvement when deploying / building (which would decrease deploy times).

adamsoderstrom commented 1 year ago

Think we should consider replacing the es2015-i18n-tag with i18next/next-i18next. Though it doesn't seem that they have default support for component-based resolvement.

I also think that our current i18n tooling could be improved. With our current setup, where we alias the i18n function as t... https://github.com/noaignite/create-ignite-app/blob/8e806ef32310a95f4ea665d5f5dd05e16749a162/src/contexts/I18n/index.js#L39

...We outrule the possibility to use the i18n-tag-schema package.

This package provides nice workflow features, such as:

I think these tools could improve workflow by running automated tests for each language, in conjunction with manual testing.


Maybe this is an opportunity to both introduce the SWC bundler and improve our i18n setup?

@alexanderflink

maeertin commented 2 weeks ago

Closing PR as no longer relevant as "cia" is now purely a documentation app.