one the one hand there is an option to compile messages strictly /ref/cli#compile-strict
on the other hand there´s a vite plugin that compiles those "under the hood"
Isn´t there a compile option for the vite plugin in order to make sure that no translations are missing? I cannot find any....
According to lingui.dev documentation it´s possible to make sure that no translations are missing by running the script "lingui compile --strict".
In combination with @lingui/vite-plugin this does not make much sense, since the vite-plugin takes care of the compilation "on the fly" [/ref/vite-plugin]
one the one hand there is an option to compile messages strictly https://lingui.dev/ref/cli#compile-strict
on the other hand there´s a vite plugin that compiles those "under the hood"
Isn´t there a compile option for the vite plugin in order to make sure that no translations are missing? I cannot find any....
According to lingui.dev documentation it´s possible to make sure that no translations are missing by running the script "lingui compile --strict".
In combination with @lingui/vite-plugin this does not make much sense, since the vite-plugin takes care of the compilation "on the fly" [https://lingui.dev/ref/vite-plugin]
It's now possible with the recent 5.3.0 release.
This release introduces the failOnMissing
option for both the Vite plugin and Webpack loader.
Once the failOnMissing
option is enabled, the build will fail if there are missing translations. This is useful to ensure that production builds don't have missing translations.
For Vite & Webpack this option should be passed directly to theirs config. lingui compile
will perform this check if the --strict
flag is passed.