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
I notice the feature is for
requirejsandsystemjs. 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 usingts-node(fail because it runs onnodeand the reason above).Is there a way to support this?
Here is the example:
i.e., using
pathsso tests can reference the source as if it is a regular module.🌷
Reference issue on
ts-node: TypeStrong/ts-node#138