-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
Description
I notice the feature is for requirejs
and systemjs
. And as this comment said, the emitted js code is unchanged by the configuration:
#5039 (comment)
So the primary usage is to resolve packages in various locations (e.g. jspm_packages
) for transpilation.
I have the following interesting use case. It worked for me so far as I was using jspm
, i.e. the actual module loading happens on the browser. However it fails when I try to do the same using ts-node
(fail because it runs on node
and the reason above).
Is there a way to support this?
Here is the example:
// tsconfig.json
{
"compileOptions": {
"baseUrl": ".",
"paths": {
"my-package": [ "src/" ] // i.e. mapping the package name to the source folder
}
}
}
// test/sometest.ts
import abc from 'my-package';
...
i.e., using paths
so tests can reference the source as if it is a regular module.
🌷
Reference issue on ts-node
: TypeStrong/ts-node#138
Metadata
Metadata
Assignees
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.