cibernox / babel-plugin-precompile-intl

Compile translations in ICU message format to invocable functions at build time
8 stars 4 forks source link

"Exported objects can only contain regular properties" #19

Open ZerdoX-x opened 2 years ago

ZerdoX-x commented 2 years ago
image

How can I use this tool if my root t10s file looks like this?

image

Yep.. It's manual namespaces realization

cibernox commented 2 years ago

That's a good question. This is not a case that crossed my mind when developing the build-time compiler.

The compiler assumed that all keys were in the en.js files. If you are importing from other files... perhaps it could recursively run for every file being imported, but it's not something supported at the moment. It wouldn't be that hard to do tho.

ZerdoX-x commented 2 years ago

Would be really cool to see this! Currently this blocks all my usage of svelte-intl-precompile. Will stick with svelte-i18n for now.