-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Feature Request: Add support for "Solution Style" tsconfig.json file #1057
Comments
yeah this is SORELY missed - moving to using references basically made all development scripts break now :-\ |
In the short-term I recommend turning on transpileOnly mode. You can configure this flag directly in your solution-style tsconfig file. |
Can't if you use compile transformers. |
You might be able to get something working by nesting other options -- not transpileOnly -- within the "ts-node" sub-object of your root tsconfig file. I'm not sure without seeing how your project is set up, but it might work. Can you share more details about your use-case? Which compile transformers are you using, and how do they relate to your development scripts? Is it possible or impossible to write an alternative tsconfig file that ts-node reads? Either way, the best chance of getting this implemented is if someone sends us a pull request. Without going into detail, the current state of the world is affecting my free time. |
Yeah I kind of use my I am using the transform-paths plugin in order to rewrite imports according to
|
Keep in mind you can specify alternative compiler options nested inside your tsconfig's "ts-node" object. So you can let A few more questions: |
@cspotcode first of all thanks a ton for your help here and taking the time - much appreciated! I believe However, potentially could use that for dev and use the transformer for production - which may be why you said I do not think the transformer works with
I will have to play around with that as well |
@bradennapier You're correct: Thanks for linking that ticket. ttypescript supports an alternative interface where it passes |
It wouldn't even be that terrible to need to define paths as a config option or something if it would make things work nicely :-P but yeah, that is past my understanding of the ts compiler. https://github.com/bradennapier/eslint-plugin-ts-import is about the extent of my compiler experience and I ended up just using |
@cspotcode well looksl ike i pretty quickly ran into dividab/tsconfig-paths#133 with that attempt :-P -- we use After spending the last 2 hours on that .. I guess the compilerOptions do not work with |
@bradennapier are you referring to how Copying a config flag to 35 referenced projects is honestly not that hard, pragmatically speaking. If that's all it takes to get you unblocked, you should go for it. |
using Think I am finally close :-) thanks again. wclr/ts-node-dev#183 -- with that PR i am fully unblocked and working with In case anyone runs into this and needs help with it - I needed to do the following: // ./register.js
const path = require('path');
const { loadConfig, register } = require('tsconfig-paths');
const dirName = path.dirname(process.argv[process.argv.length - 1]);
const config = loadConfig(dirName);
// dev support for absolute path resolution while allowing transpileOnly to work
register({
baseUrl: config.absoluteBaseUrl,
paths: config.paths
}); then in my
|
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#support-for-solution-style-tsconfigjson-files
yarn ts-node scripts/foo.ts
should auto use./scripts/tsconfig.scripts.json
The text was updated successfully, but these errors were encountered: