Emits '../' for node_modules and subfolder tsconfig
See original GitHub issuetsconfig.base.json compilerOptions:
"paths": {
"vue": ["https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"]
}
subfolder/tsconfig.json:
"extends": "../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"plugins": [{ "transform": "typescript-transform-paths" }]
}
ttsc generated module file:
import Vue from "../https:/cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js";
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
TSConfig Reference - Docs on every TSConfig option
Compiler Options. These options make up the bulk of TypeScript's configuration and it covers how the language should work. Type Checking; Modules; Emit...
Read more >Publishing Node modules with TypeScript and ES modules
We can do this by making two tsconfig. json files, one that targets ES modules and another for CommonJS.
Read more >What it means **/node_modules/* in tsconfig.json?
It's to exclude any node_modules sub-folders (at any depth) of the stuff in the root level node_modules folder.
Read more >Understanding TypeScript Configuration Options
This post will walk you through how tsconfig.json works in your ... If you want to specify the module that should be included...
Read more >Configuring TypeScript compiler - inDepthDev
tsconfig.json can be created by the compiler automatically using init flag: ... Using the default configuration, the compiler only emits .js files.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@nonara I agree. I’ve found transformer with functionality of interest.
@viT-1 Thanks for the suggestion! I believe that functionality goes a bit beyond the scope of what we’re doing, however.
Our aim with this plugin is to rewrite imports using the
tsconfig.jsonpathsconfiguration. We rely on the TS compiler API to hand off that resolution to the typescript compiler to ensure that we’re in sync.We have gone a little beyond that directive by providing for single comment resolution overrides, but a change like you’re suggesting would require rewriting or splitting the resolution engine, which would come with many side effects. It would also potentially get confusing if there are intersecting resolution paths between
tsconfigandimportmap, etc.If there is a broad enough interest in adding support in the future, we can revisit this, but for now, I think we’ll stick with our current path.
You’re welcome to fork the repository and use it as a basis that suits your needs, however!