Closed sheremet-va closed 1 year ago
TypeScript with moduleResolution: "bundler" or module: "node16" only looks at "types" condition in exports field. If there is no types field there as the first option, it will fail. You can see all the errors here: https://arethetypeswrong.github.io
moduleResolution: "bundler"
module: "node16"
"types"
exports
types
Documentation: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html
Proposed fix:
// package.json { "exports": { ".": { "types": "./types/index.d.ts", "import": "./dist/vue-easy-lightbox.esm.min.js", "require": "./dist/vue-easy-lightbox.common.min.js", "browser": "./dist/vue-easy-lightbox.umd.min.js" }, "./external-css": { "types": "./types/index.d.ts", "import": "./dist/external-css/vue-easy-lightbox.esm.min.js", "require": "./dist/external-css/vue-easy-lightbox.common.min.js", "browser": "./dist/external-css/vue-easy-lightbox.umd.min.js" }, "./external-css/vue-easy-lightbox.css": "./dist/external-css/vue-easy-lightbox.css", "./*": "./*" }, }
Hi, i have released these change in v1.15.0.
TypeScript with
moduleResolution: "bundler"
ormodule: "node16"
only looks at"types"
condition inexports
field. If there is notypes
field there as the first option, it will fail. You can see all the errors here: https://arethetypeswrong.github.ioDocumentation: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html
Proposed fix: