Comment by MrJohz
11 hours ago
> - packages in workspaces can be used as dependencies without compilation (node's type stripping doesn't support this)
Node does support this! Although it may depend on exactly you link the packages within a workspace — I use `pnpm` and it Just Works™. Because NodeJS looks at the resolved symlink to decide whether a project is in `node_modules` or not, if the symlink resolves to a package in the workspace, then NodeJS will do type stripping as normal.
In fairness, the documentation is very unspecific about this, so I just had to try it out and see what happens, but it does work.
I think NodeJS also has coverage these days, although I could be wrong there.
That must be new. It did not work when I last tested type stripping, earlier this year using pnpm as well. And to be fair bun didn't work either.
Glad if it's working now regardless though, I also see some experimental support for coverage in the docs now.