Skip to content

Commit

Permalink
Update package.json exports to include types
Browse files Browse the repository at this point in the history
Needed for newer typescript with certain moduleResolution settings.

Found the explanation & solution here:
gxmari007/vite-plugin-eslint#60

& the docs for the option here:
https://nodejs.org/api/packages.html#packages_exports
(with `types` being defined here: https://nodejs.org/api/packages.html#conditional-exports)
  • Loading branch information
tennox committed Jun 11, 2023
1 parent 53464b1 commit f78e541
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package.json
Expand Up @@ -3,7 +3,12 @@
"version": "8.2.0",
"description": "A JavaScript framework for creating fully-featured web applications, components libraries, and single web components with unique declarative and functional architecture",
"type": "module",
"exports": "./src/index.js",
"exports": {
".": {
"types": "./types/index.d.ts",
"default": "./src/index.js"
}
},
"types": "types/index.d.ts",
"bin": "./cli/index.js",
"sideEffects": false,
Expand Down

0 comments on commit f78e541

Please sign in to comment.