Spittal / vue-i18n-extract

Manage vue-i18n localization with static analysis
https://pixari.github.io/vue-i18n-extract/#what-is-it
MIT License
313 stars 86 forks source link

Incorrect 'module' in package.json #206

Open CrabSAMA opened 1 year ago

CrabSAMA commented 1 year ago

https://github.com/Spittal/vue-i18n-extract/blob/f856484d2f62abbd931d84676519f529062d94da/package.json#L19 This line is incorrect, in dist I found vue-i18n-extract.modern.mjs but now module is vue-i18n-extract.modern.js. It will get some questions when bundling it with rollup or vite.

when using rollup:

(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
vue-i18n-extract (imported by "src/index.ts")

rollup can bundle success, but it will not bundle vue-i18n-extract to the building.

when using vite:

[commonjs--resolver] Failed to resolve entry for package "vue-i18n-extract". The package may have incorrect main/module/exports specified in its package.json.
error during build:
Error: Failed to resolve entry for package "vue-i18n-extract". The package may have incorrect main/module/exports specified in its package.json.

using vite bundle will throw an error and the build fails.