You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the preact-cli, importing po files directly gives me ts and webpack errors.
TS:
typescript: Cannot find module 'src/assets/locales/en.po' or its corresponding type declarations.
npm run build (comes with preact-cli)
[...]X ERROR ./src/locales/en.tsERROR in ./src/locales/en.ts(3,22):TS2307: Cannot find module 'src/assets/locales/en.po' or its corresponding type declarations.
This is using a locales/en.ts based on the examples with its associated po file in assets/locales/en.po.
When using the preact-cli, importing
po
files directly gives me ts and webpack errors.TS:
typescript: Cannot find module 'src/assets/locales/en.po' or its corresponding type declarations.
npm run build
(comes with preact-cli)This is using a
locales/en.ts
based on the examples with its associated po file inassets/locales/en.po
.When adding some ignore comments, everything works!
Here is the preact.config.js that I am using (it may be handy to add an example for this - I'll open a PR if you're interested).
Is there a better way to include the definitions for po files?
The text was updated successfully, but these errors were encountered: