-
Notifications
You must be signed in to change notification settings - Fork 469
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
Missing webpack context rules for requiring lazy messages file #1068
Comments
I'll only try to load files with |
I think this is fine. Well done for reactivity 👏 |
Released the fix in https://github.com/nuxt-community/i18n-module/releases/tag/v6.20.2 |
Would appreciate adding YAML files to the list ( |
Up until now, the module was able to handle any file, that webpack would recognize. So changing this behavior is really a breaking change, not just a fix - for example breaking my application as soon as I bumped the library. Also, it maybe would be nice to add the possibility to define custom file types in the config. |
Sorry about that. Addressed with 01f92ae and released in https://github.com/nuxt-community/i18n-module/releases/tag/v6.20.3
I will consider that if there is really a need for it (that is if someone complains again). |
Version
nuxt-i18n: 6.20.1
nuxt: 2.15.0
Nuxt configuration
mode:
Nuxt-i18n configuration
i18n: {
locales: [{ code: "fr", file: "fr.js" }],
langDir: "lang/lazyDir",
defaultLocale: "fr",
lazy: true
}
Reproduction Link
https://codesandbox.io/s/romantic-hamilton-o1ijf?file=/lang/README.md
Steps to reproduce
Insert a .md file inside the folder where lazy files are loaded (aka langDir property)
What is Expected?
No webpack warnings for unhandled files.
What is actually happening?
Webpack wants me to handle the md files. It throws this warning
Thoughts
Maybe it's because of require context who parse too much file extensions.
A quick fix is to keep the langDir as light as possible without md files, and require messages from another folder.
The text was updated successfully, but these errors were encountered: