-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Treat user code as a referenced project #2444
Conversation
3fd1830
to
4d3f95d
Compare
@@ -36,5 +20,8 @@ | |||
}, | |||
"include": [ | |||
"src" | |||
], | |||
"references": [ | |||
{ "path": "../../../tsconfig.json" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: draw this knowledge from Haskell.
Same thing in package.json.
], | ||
"references": [ | ||
// TODO: It would be better to inject this knowledge from Haskell. | ||
{ "path": "../../../tsconfig.json" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -6,6 +6,9 @@ | |||
{ | |||
"compilerOptions": { | |||
"module": "esnext", | |||
// Needed because this is used as a project reference. | |||
// TODO: Why doesn't next need it | |||
"composite": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: explore why doesn't next need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: document where you got this from (Vite).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: explain where you got this from (Vite and other research)
// https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file | ||
"outDir": ".wasp/phantom" | ||
} | ||
"outDir": ".wasp/out/user" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: leave comment why not noEmit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain where you got this (Vite)
// make project references work for the TS config), then I believe the | ||
// correct configuration is "rootDir": "." (the project reference should | ||
// take care of the user code), but we should double-check. | ||
"rootDir": ".", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to previous history.
"vite.config.ts", | ||
"./src/ext-src/vite.config.ts" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline
@@ -1,11 +1,18 @@ | |||
// =============================== IMPORTANT ================================= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea for the future, I've love it if we could apply tsconfig
fixes with Wasp CLI so users don't have to do it manually.
@@ -20,6 +27,7 @@ | |||
"dom.iterable", | |||
"esnext" | |||
], | |||
"skipLibCheck": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We added this option, but we validate it with anyValueIsFine
so why add it at all?
@@ -62,6 +64,9 @@ validateSrcTsConfig tsConfig = | |||
showAsJsValue expectedValue ++ "." | |||
] | |||
|
|||
anyValueIsFine :: FullyQualifiedFieldName -> [String] | |||
anyValueIsFine = const [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: remove
Fixes #2247