Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dashboard/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"paths": {
"@/*": ["./src/*"]
},
"outDir": "dist",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using dist as the outDir may conflict with Vite's default output directory. If tsc is ever run without the --noEmit flag (e.g., by an IDE or a static analysis tool), it will populate the dist folder 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 build script in package.json uses vue-tsc --noEmit, this change will not affect the production build process as noEmit causes TypeScript to ignore the outDir setting. However, to avoid potential directory pollution, consider using a distinct directory like dist-tsc.

Suggested change
"outDir": "dist",
"outDir": "dist-tsc",

"allowJs": true
},

Expand Down
1 change: 1 addition & 0 deletions dashboard/tsconfig.vite-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["vite.config.*"],
"compilerOptions": {
"outDir": "dist",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using dist here may cause collisions with the main project's output. Since this configuration is specifically for Vite configuration files and uses composite: true, it is recommended to use a separate output directory (e.g., dist-tsc-vite) to prevent build metadata (like .tsbuildinfo) from interfering with the main project's output if both are processed by a tool like tsc --build.

Suggested change
"outDir": "dist",
"outDir": "dist-tsc-vite",

"composite": true,
"allowJs": true,
"types": ["node"]
Expand Down
Loading