parcel-plugin-typescript
parcel-plugin-typescript copied to clipboard
Path mappings not applied for re-exports
Given tsconfig.json similar to
{
"compilerOptions": {
"baseUrl": "src",
"paths": {
"@src/*": ["./*"]
}
}
This works:
// src/index.ts
import {some_enum} from '@src/some_enum';
import {some_class} from '@src/some_class';
export {some_enum, some_class};
This does not work:
export * from '@src/some_enum'
export * from '@src/some_class'
Bug looks to be in backend/transformers/paths.ts
....if (ts.isImportDeclaration(child)) { // This returns false, but we need to engage in name mangling here
This has been fixed in the dev version (parcel-plugin-typescript@next
), could you try it?
https://github.com/fathyb/parcel-plugin-typescript/blob/8aeb184642193db8f7312e8c3c453c4d25959bfd/src/backend/transformers/paths.ts#L55-L60
@fathyb This seems to be broken again currently.