gertqin / vuex-class-modules

Typescript class decorators for vuex modules
MIT License
194 stars 20 forks source link

Adds "./package.json" to exports #70

Closed subhaze closed 1 year ago

subhaze commented 3 years ago

Updates from 1.2.0+ fail when building with Webpack 5/node 16 due to Package subpath './package.json' is not defined by "exports" in [...]/node_modules/vuex-class-modules/package.json

bodograumann commented 3 years ago

First of all, thank you for contributing. It really is appreciated. At first glance, this solution doesn’t feel right to me though. I have been using vuex-class-modules with webpack-5 (through vue-cli-5) without any problems. Do you have a minimal reproduction of the problem?

subhaze commented 3 years ago

I don't have a minimal setup to share, other than the above mentioning, webpack 5/ Node 16 with a note that it's within a NativeScript setup. It felt wrong to me as well but adding this to the package in node_modules everything builds fine, or, pinning to a version before 1.2.0 builds fine, anything at or after 1.2.0 fails with wanting ./package.json as part of the exports.

When researching this error, most references I found were related to React Native, so, my only thought is that NativeScript/React Native import package.json files within their tooling.

Reference link https://github.com/uuidjs/uuid/pull/449