Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ node --experimental-transform-types --import="amaro/transform" file.ts

#### Type stripping in dependencies

Contrary to the Node.js [TypeScript support](https://nodejs.org/docs/latest/api/typescript.html#type-stripping-in-dependencies), when used as a loader, Amaro handles TypeScript files inside folders under a `node_modules` path.
When used as a loader, Amaro attempts to handle TypeScript files inside folders under a `node_modules` path.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is weird, makes it seem like when user as a loader Amaro always tried to handle files inside node_modules.

However, recent Node.js versions disallow type stripping for files under `node_modules` and throw
`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`. This behavior is enforced by Node.js and changed after
`--experimental-strip-types` was unflagged. As a result, type stripping in dependencies does not work on
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think its necessary in the documentation to explain why this feature stopped working

current Node.js versions when using Amaro as a loader.

### Monorepo usage

Expand Down