-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remix updates tsconfig and doesn't care about extends key #4978
Comments
interesting, we should be merging based on |
even weirder, just copy pasted the above tsconfigs and mine didn't update anything 😵💫 |
@mcansh Interesting: ) Added video Screen-Recording-2022-12-31-at-0.mp4 |
@mcansh And added video with debugging where it's happens. Screen-Recording-2022-12-31-at-0.mp4Checking Screen.Recording.2022-12-31.at.00.44.03.mov |
cool, i'll check it out asap |
@mcansh |
@mcansh I moved from Thank you for your attitude. |
@dormammun @mcansh Isn't this a valid bug? It seems to me that if extends resolution in
If
...Then it's all good. However, if/when we decide to rely on an external package instead, then I think we'd probably run into the same thing? |
definitely a valid bug, we use {
extendedConfig: '@packages/ts-configs/remix',
extendedConfigPath: '/Users/logan/remix-npm-monorepo-tsconfig/my-remix-app/@packages/ts-configs/remix.json'
} where
{
"extends": "../node_modules/@packages/ts-configs/remix.json"
} |
@mcansh Thank you for verifying! It's definitely a problem with yarn v2+ as well as I mentioned. 👍🏻 |
@mcansh This needs to be reopened. |
agreed - gonna look into a barebones typescript project with yarn berry (and npm) and |
I have no idea why but when I also extend from // @tsconfig/remix
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Remix",
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2019",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},
// Remix takes care of building everything in `remix build`.
"noEmit": true
}
} |
just tried a fresh app using @tsconfig/remix and it worked for yarn (v1), npm, and pnpm. for yarn and npm i had to re-add compilerOptions.paths in order for aliases to work, but no changes were made to my tsconfig from {
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"extends": "@tsconfig/remix/tsconfig.json"
} |
That's strange. Running {
"extends": "@tsconfig/remix",
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"baseUrl": ".",
"skipLibCheck": true
}
} I get: {
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"es2019"
],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"resolveJsonModule": true,
"target": "es2019",
"strict": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": "./",
"paths": {
"~/*": [
"./app/*"
]
},
"noEmit": true,
"skipLibCheck": true
},
"files": [
"./remix.env.d.ts",
"./app/root.tsx",
"./app/routes/_index.tsx"
],
"include": [
"remix.env.d.ts",
"**/*.ts",
"**/*.tsx"
]
} ... in also a fresh app, it is resolved exactly the same as when having |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.9.0
Steps to Reproduce
tsconfig-base.json
to extendstsconfig-react.json
tsconfig-remix.json
tsconfig.json
Run
npm run dev
And you'll see:
The following suggested values were added to your "tsconfig.json". These values can be changed to fit your project's needs:
The following mandatory changes were made to your tsconfig.json:
And
tsconfig.json
will be updated. So Remix doesn't care about extends and update config toAs you see this props already exists in extended config, but why remix updates it?
If I run
tsc --showConfig
beforenpm run dev
and config will be updated, I got this:As you see, ts tracks extended configs and merged it.
Expected Behavior
Remix will track extends from
tsconfig.json
and will not update itActual Behavior
Remix doesn't care about
tsconfig
extends props.If I log
console.log(fullConfig);
fromnode_modules/@remix-run/dev/dist/compiler/utils/tsconfig/write-config-defaults.js
It returns
The text was updated successfully, but these errors were encountered: