ihmpavel/all-iso-language-codes

Could not resolve "**/*.json"

alexvoedi opened this issue · 3 comments

Describe the bug
When trying to get language names from language codes an error is thrown:

X [ERROR] Could not resolve "../data/yo/639-1.json"

    node_modules/.pnpm/all-iso-language-codes@1.0.8/node_modules/all-iso-language-codes/build/src/imports.js:186:48:
      186 │ const _639_1_json_181 = __importDefault(require("../data/yo/639-1.json"));~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] Could not resolve "../data/za/639-1.json"

    node_modules/.pnpm/all-iso-language-codes@1.0.8/node_modules/all-iso-language-codes/build/src/imports.js:187:48:
      187 │ const _639_1_json_182 = __importDefault(require("../data/za/639-1.json"));

Seemingly the .json files can not be imported. Looking at the build files, it can be seen that the relative import is incorrect:
image

Additional information:
I use vite 2.9.9 and vue 3.2.36.

Screenshots (if applicable)
image

Hi,

could you please check new released version 1.0.9? In the last version, build command did not created the data folder in build.

Works now, thank you.

Wonderful 🙌