-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Domain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behaviorNeeds ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
Bug Report
Typescript ignores Package Subpath Imports breaking the linter when using a loader. These "aliases" are not optional when you have multiple entry points or executables at different levels.
Related to #33079
Making a new bug as the conversation there is about exports... but the import side is also important and has a seperate set of solutions.
🔎 Search Terms
Module alias, import patterns, pwd, es modules, node
🕗 Version & Regression Information
Please keep and fill in the line that best applies:
- This is the behavior in every version I tried
⏯ Playground Link
Running node 16 with ts-node loader in a native ES Module package.
Coming soon from runkit. Integration issues like this are tricky. But I've got the tools to make it so.
💻 Code
import getMongoClient from '#src/models/mongodb.js'🙁 Actual behavior
"Cannot find module '#src/models/mongodb.js' or its corresponding type declarations.ts(2307)"
🙂 Expected behavior
Should work like regular javascript.
zalanlevai, esdmr, bennypowers, abdonrd, akshayr20 and 29 more
Metadata
Metadata
Assignees
Labels
Domain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behaviorNeeds ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript