tsc-alias
tsc-alias copied to clipboard
Path starting with @ is not replaced
Reproducible in this project https://github.com/seamapi/types at this commit: https://github.com/seamapi/types/commit/68ec4828c2c835d1a0694185d6dcd01fa2fe0a5b
Project defines paths as
{
"paths": {
"@seamapi/types": ["./src/index.ts"],
"@seamapi/types/connect": ["./src/connect.ts"],
"@seamapi/types/devicedb": ["./src/devicedb.ts"],
"lib/*": ["./src/lib/*"]
}
}
And has an import statement
import { schemas as devicedb_schemas } from '@seamapi/types/devicedb'
but in the final output, this import statement is unchanged, however it should be replaced as
import { schemas as devicedb_schemas } from '../../../../../../devicedb.js';
Workaround is adding a custom replacer: https://github.com/seamapi/types/pull/610