Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: parcel incompatible with new node12 and nodenext typescript module resolution modes #7828

Closed
philkunz opened this issue Mar 15, 2022 · 1 comment

Comments

@philkunz
Copy link

philkunz commented Mar 15, 2022

🐛 bug report

parcel seems to be incompatible with the new moduleResolution modes of TypeScript.

In TypeScript with module-resolution mode "node12" you can write import MyDefaultExport from './myfile.js' and it will resolve to ./myfile.ts

This does not work currently.

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ES2020",
    "moduleResolution": "node12"
  }
}

The reasoning is explained here: https://www.typescriptlang.org/docs/handbook/esm-node.html

🤔 Expected Behavior

Should simply resolve to .ts file

😯 Current Behavior

File is not found

@philkunz philkunz changed the title parcel incompatible with new node12 and nodenext typescript module resolution modes TypeScript: parcel incompatible with new node12 and nodenext typescript module resolution modes Mar 15, 2022
@philkunz
Copy link
Author

duplicate of #7823

@mischnic Multiple people seem to have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant