Closed fonsp closed 2 years ago
and it looks like my bundler expects the declarations to have the same name as the JS file.
Seems it is ignoring the types
field in package.json, which sounds like an issue in the bundler. I generally don't accept patches that work around bugs in other software, since those are really not my responsibility.
Alright, sounds fair!
I was having trouble building declarations for my project, with the following error:
(I am using @codemirror/language@0.20.1 and @lezer/highlight@0.16.0.)
I am getting this error because the declarations for
@lezer/highlight/dist/index.js
are in@lezer/highlight/dist/highlight.d.ts
, not@lezer/highlight/dist/index.d.ts
, and it looks like my bundler expects the declarations to have the same name as the JS file.This PR fixes it by renaming
src/highlight.ts
tosrc/index.ts
, which will rename the.d.ts
file. (I could not find a way to change the name of the declarations file using config alone).