fix: TypeScript resolution should now work across bundlers#1165
Conversation
|
whoaaaaaa Gonna merge this and will see if I can get a release going. |
|
okay, one question - do we need the I kinda like the are those package.json files scooped up by a bundler somewhere? |
Unfortunately, yes, they need to stay as they are :( Big headache for many of my projects as well, I agree. The reason for it is that older bundlers and Node installs used the literal filesystem lookups to see if there were If we remove, say, |
|
(total aside; thanks so much for being so bright and kind in these replies ✨ Always such a refreshing welcome to any new project one contributes to :D ) |
|
ok released as |
This PR fixes #1164 by:
node10(think Webpack 4 and older node) resolution via{root}/one/package.jsonfiles.d.ctstypes so TypeScript doesn't incorrectly warn ofdefaultusage when doing arequire./miscand./viewsThis should not be a breaking change for existing users, but will likely fix many reported problems in CJS (and even some ESM) usage of this library
Before
Using "AreTheTypesWrong" CLI:
After
Using the same CLI: