Giter Site home page Giter Site logo

Comments (3)

 avatar commented on August 14, 2024

I did so, due to the way i understood how loaders in Webpack are expected to work, and i opted for the most convenient way for developers (i hope).

You can't pass in a directory as the context for a loader, it has to be a file. And i simply wanted a loader that reconstructs a DirectoryStructure to the i18next ResourceStore object. So that, when adding a file or language, i will have it directly available in the application. No mapping, no nothing.

The empty index.js is just to point to the "start directory" where your language files are located. From the dir of the index.js the loader assumes that every folder in this dir is a language, and every filename underneath a language is a namespace. So your good to go.

Furthermore i thought the index.js file could function as a config object if needed. But so far it stayed empty.

Do you know a way to pass in a direcotry as the loaders context?

from i18next-resource-store-loader.

EvHaus avatar EvHaus commented on August 14, 2024

I'm pretty new to Webpack so I'm not sure if there's a way to use directories.

Thanks for the explanation.

from i18next-resource-store-loader.

 avatar commented on August 14, 2024

you're welcome

from i18next-resource-store-loader.

Related Issues (11)

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.