-
Notifications
You must be signed in to change notification settings - Fork 402
Unable to get lingui to work with vite/react-swc #2229
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
Comments
What's inside |
It's simply an array of locales supported. I won't be at my computer until the morning (America/Denver tz), but, it is something along the lines of the following export const locales = ['en','es','fr','zh','psuedo'] as const; |
Double check that the |
I know that the value is present, because I use this as part of my routing validation, only valid values excluding pseudo are allowed. |
Unfortunately, i'm lacking of ideas and could not help without a reproduction. The issue is not related to You can try to debug this plugin by your own to find what's wrong in your setup. Basically what this plugin is doing is loading all catalogs as If it wasn't able to find catalog, it will throw such error. So you need to go step by step with a debugger and check all paths in the plugin. |
I ran I will dig into this further, I am just confused because this (nearly identical) configuration was working fine inside of nextjs. The only thing that changed was my catalog path changed from Also just to confirm, here's a copy/paste of my lingui.locales.ts export const locales = ['en', 'es', 'fr', 'jp', 'zh', 'pseudo'] as const; |
Quick Update! I changed ny include paths to {
include: ['<rootDir>/src/routes/**/*.{ts,tsx}', '<rootDir>/src/components/**/*.{ts,tsx}']
} and it's working now, however if it set it back to just |
Well yes, i don't remember exactly how this works, because I touched this code long time ago. But i suppose catalog will not be created if there are 0 matched source files.
|
I am working on a project but I am unable to get the application to run/build when enabling lingui.
The file definitely exists:
My config file looks like this:
Here's my vite.config.js file
Here's the directory structure:
Relevant package.json entries
I had this working just fine inside of a nextjs project, but we don't need SSR for our use case so we're moving away from that for now and I just can't seem to get past this initial configuration.
The text was updated successfully, but these errors were encountered: