-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Treat user code as a referenced project #2444
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
Changes from 4 commits
382dc59
79924a0
4d3f95d
91b6f80
ae5bcaf
7f9e078
2d4c5c9
f390cd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
// =============================== IMPORTANT ================================= | ||
// This file is mainly used for Wasp IDE support. | ||
// | ||
// This file is only used for Wasp IDE support. You can change it to configure | ||
// your IDE checks, but none of these options will affect the TypeScript | ||
// compiler. Proper TS compiler configuration in Wasp is coming soon :) | ||
// Wasp will compile your code with slightly different (less strict) compilerOptions. | ||
// You can increase the configuration's strictness (e.g., by adding | ||
// "noUncheckedIndexedAccess": true), but you shouldn't reduce it (e.g., by | ||
// adding "strict": false). Just keep in mind that this will only affect your | ||
// IDE support, not the actual compilation. | ||
// | ||
// Full TypeScript configurability is coming very soon :) | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
// Needed because this is used as a project reference. | ||
"composite": true, | ||
"target": "esnext", | ||
// We're bundling all code in the end so this is the most appropriate option, | ||
// it's also important for autocomplete to work properly. | ||
|
@@ -20,6 +27,7 @@ | |
"dom.iterable", | ||
"esnext" | ||
], | ||
"skipLibCheck": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We added this option, but we validate it with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed in #2471 |
||
"allowJs": true, | ||
"typeRoots": [ | ||
// This is needed to properly support Vitest testing with jest-dom matchers. | ||
|
@@ -32,10 +40,9 @@ | |
// Source 2: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843 | ||
"node_modules/@types" | ||
], | ||
// Since this TS config is used only for IDE support and not for | ||
// compilation, the following directory doesn't exist. We need to specify | ||
// it to prevent this error: | ||
// https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file | ||
"outDir": ".wasp/phantom" | ||
} | ||
"outDir": ".wasp/out/user" | ||
sodic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"include": [ | ||
"src" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "@tsconfig/vite-react/tsconfig.json", | ||
"compilerOptions": { | ||
// Temporary loosen the type checking until we can address all the errors. | ||
"jsx": "preserve", | ||
"allowJs": true, | ||
"strict": false, | ||
"skipLibCheck": true, | ||
// Allow importing pages with the .tsx extension. | ||
"allowImportingTsExtensions": true, | ||
"noEmit": true, | ||
}, | ||
"include": [ | ||
"src" | ||
], | ||
"references": [ | ||
// TODO: It would be better to inject this knowledge from Haskell. | ||
{ "path": "../../../tsconfig.json" } | ||
sodic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
} |
sodic marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,7 @@ | ||
{ | ||
"extends": "@tsconfig/vite-react/tsconfig.json", | ||
"compilerOptions": { | ||
// Temporary loosen the type checking until we can address all the errors. | ||
"jsx": "preserve", | ||
"allowJs": true, | ||
"strict": false, | ||
// Allow importing pages with the .tsx extension. | ||
"allowImportingTsExtensions": true, | ||
}, | ||
"include": [ | ||
"src" | ||
], | ||
"files": [], | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.node.json" | ||
} | ||
{ "path": "./tsconfig.app.json" }, | ||
{ "path": "./tsconfig.node.json" }, | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,13 @@ | |
"compilerOptions": { | ||
"composite": true, | ||
"skipLibCheck": true, | ||
"noEmit": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"allowSyntheticDefaultImports": true | ||
"allowSyntheticDefaultImports": true, | ||
}, | ||
"include": ["vite.config.ts", "./src/ext-src/vite.config.ts"] | ||
} | ||
"include": [ | ||
"vite.config.ts", | ||
"./src/ext-src/vite.config.ts" | ||
] | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Newline There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This got fixed somewhere. Not sure where, but I see the file is now properly formatted on main. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
// =============================== IMPORTANT ================================= | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idea for the future, I've love it if we could apply |
||
// This file is mainly used for Wasp IDE support. | ||
// | ||
// This file is only used for Wasp IDE support. You can change it to configure | ||
// your IDE checks, but none of these options will affect the TypeScript | ||
// compiler. Proper TS compiler configuration in Wasp is coming soon :) | ||
// Wasp will compile your code with slightly different (less strict) compilerOptions. | ||
// You can increase the configuration's strictness (e.g., by adding | ||
// "noUncheckedIndexedAccess": true), but you shouldn't reduce it (e.g., by | ||
// adding "strict": false). Just keep in mind that this will only affect your | ||
// IDE support, not the actual compilation. | ||
// | ||
// Full TypeScript configurability is coming very soon :) | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"composite": true, | ||
"target": "esnext", | ||
// We're bundling all code in the end so this is the most appropriate option, | ||
// it's also important for autocomplete to work properly. | ||
|
@@ -20,6 +26,7 @@ | |
"dom.iterable", | ||
"esnext" | ||
], | ||
"skipLibCheck": true, | ||
"allowJs": true, | ||
"typeRoots": [ | ||
// This is needed to properly support Vitest testing with jest-dom matchers. | ||
|
@@ -36,6 +43,15 @@ | |
// compilation, the following directory doesn't exist. We need to specify | ||
// it to prevent this error: | ||
// https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file | ||
"outDir": ".wasp/phantom" | ||
} | ||
// "outDir": ".wasp/out/user" | ||
"outDir": ".wasp/out/user", | ||
// "baseUrl": ".", | ||
// "paths": { | ||
// "@components/*": ["src/components/*"], | ||
// "@util": ["src/util.js"], | ||
// } | ||
}, | ||
"include": [ | ||
"src" | ||
] | ||
} |
Uh oh!
There was an error while loading. Please reload this page.