-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: add outDir for tsconfig #7518
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 1 commit
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 |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| "paths": { | ||
| "@/*": ["./src/*"] | ||
| }, | ||
| "outDir": "dist", | ||
| "allowJs": true | ||
| }, | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |||||
| "extends": "@vue/tsconfig/tsconfig.json", | ||||||
| "include": ["vite.config.*"], | ||||||
| "compilerOptions": { | ||||||
| "outDir": "dist", | ||||||
|
Contributor
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. Using
Suggested change
|
||||||
| "composite": true, | ||||||
| "allowJs": true, | ||||||
| "types": ["node"] | ||||||
|
|
||||||
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.
Using
distas theoutDirmay conflict with Vite's default output directory. Iftscis ever run without the--noEmitflag (e.g., by an IDE or a static analysis tool), it will populate thedistfolder with transpiled files, which could interfere with the production build or lead to the accidental deployment of unbundled code.Regarding your concern about CI: since the
buildscript inpackage.jsonusesvue-tsc --noEmit, this change will not affect the production build process asnoEmitcauses TypeScript to ignore theoutDirsetting. However, to avoid potential directory pollution, consider using a distinct directory likedist-tsc.