lezer-parser / html

An HTML parser for Lezer
MIT License
13 stars 10 forks source link

Update TypeScript exports to support moduleResolution bundler #9

Closed kwangure closed 1 year ago

kwangure commented 1 year ago

moduleResolution: "bundler" is a recent setting added to TypeScript to support bundler setups. It's the setting you should probably be using when bundling code. With this setting TypeScript only searches for types in the exports field of the package.json.

It requires the following change:

 "exports": {
   "import": "./dist/index.js",
   "require": "./dist/index.cjs",
+  "types": "./dist/index.d.ts"
 },
marijnh commented 1 year ago

Should already work as of 426fe0428187967a07597aa7f0dd00e9aec5e4fc