Code Monkey home page Code Monkey logo

Comments (7)

xiCO2k avatar xiCO2k commented on May 27, 2024

Hey @davidtovt are you using webpack?

Also can you share the code where you import the code?

from laravel-vue-i18n.

davidtovt avatar davidtovt commented on May 27, 2024

@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

from laravel-vue-i18n.

xiCO2k avatar xiCO2k commented on May 27, 2024

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.

from laravel-vue-i18n.

davidtovt avatar davidtovt commented on May 27, 2024

@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.

from laravel-vue-i18n.

xiCO2k avatar xiCO2k commented on May 27, 2024

Weird case, try this since I miss the $ sign

resolve: (lang) => import(`../lang/${lang}.json`),

from laravel-vue-i18n.

davidtovt avatar davidtovt commented on May 27, 2024

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?

from laravel-vue-i18n.

xiCO2k avatar xiCO2k commented on May 27, 2024

Should not be related, one thing can you check if the path is correct to your language files?

from laravel-vue-i18n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.