Closed davidtovt closed 2 years ago
Hey @davidtovt are you using webpack?
Also can you share the code where you import the code?
@xiCO2k Yes, I use Webpack.
I share my code: https://i.imgur.com/VwjrjHr.png
And there is an error in node_modules/laravel-vue-i18n/tsconfig.json https://i.imgur.com/ptbhdeu.png
THanks @davidtovt
try this:
resolve: (lang) => import(`../lang/{lang}.json`),
it will tell webpack
to take a look on the lang folder and chunk every lang file.
@xiCO2k then I get the same error, just with en_json:
GET http://***.com/js/resources_lang_en_json.js net::ERR_ABORTED 404 (Not Found)
Uncaught (in promise) TypeError: Cannot load lang: en file: Loading chunk resources_lang_en_json failed.
Weird case, try this since I miss the $ sign
resolve: (lang) => import(`../lang/${lang}.json`),
It is not working.
In laravel-vue-i18n/src/index.ts there is a line which not used anywhere:
import { LanguageJsonFileInterface } from './interfaces/language-json-file'
It is not problem?
Should not be related, one thing can you check if the path is correct to your language files?
Hello,
Why I get the following error?
The resources/lang/en.json file exists.