Uh oh!
There was an error while loading. Please reload this page.
chore(dashboard): convert vite config to TypeScript - #383
Merged
Conversation
Contributor
Greptile SummaryThe PR converts the dashboard Vite configuration to TypeScript and brings it under the dashboard typecheck.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| dashboard/frappe-ui-vite.d.ts | Adds focused typings for the frappe-ui Vite plugin and the option shapes used by the dashboard configuration. |
| dashboard/tsconfig.json | Extends typecheck coverage to the Vite configuration and its ambient module declaration. |
| dashboard/vite.config.ts | Renames the existing Vite configuration to TypeScript without changing its effective build behavior. |
Reviews (2): Last reviewed commit: "chore(dashboard): trim vite config comme..." | Re-trigger Greptile
`tsconfig.json` included only `src/` and `tests/`, so the vite config was checked by nothing. Renaming it and adding it to `include` puts it under `yarn typecheck`. The conversion needs `frappe-ui/vite` to have types, which it does not ship — it is plain JavaScript with no declarations. The ambient declaration added here covers only the options its plugins actually read, which is what makes this worth doing: passing a key frappe-ui ignores is now a type error instead of config that looks applied and is not. Re-adding the `target` key removed in the previous commit fails typecheck with TS2353. `tailwind.config.js` and `postcss.config.js` are still unchecked. They would need `allowJs` or their own conversion, and neither is carrying dead config. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drops the link-to-docs line and cuts the two optimizeDeps comments to the part that is not recoverable from the code: why frappe-ui is excluded and why its nested feather-icons is not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
harshtandiyaforce-pushed
the
chore/vite-config-ts
branch
from
August 27, 2026 11:47
d59d85b to
1efcc41CompareUh oh!
There was an error while loading. Please reload this page.
Contributor
Successfully created backport PR for |
harshtandiya added a commit
that referenced
this pull request
Aug 27, 2026
chore(dashboard): convert vite config to TypeScript (#383) * chore(dashboard): convert vite config to TypeScript `tsconfig.json` included only `src/` and `tests/`, so the vite config was checked by nothing. Renaming it and adding it to `include` puts it under `yarn typecheck`. The conversion needs `frappe-ui/vite` to have types, which it does not ship — it is plain JavaScript with no declarations. The ambient declaration added here covers only the options its plugins actually read, which is what makes this worth doing: passing a key frappe-ui ignores is now a type error instead of config that looks applied and is not. Re-adding the `target` key removed in the previous commit fails typecheck with TS2353. `tailwind.config.js` and `postcss.config.js` are still unchecked. They would need `allowJs` or their own conversion, and neither is carrying dead config. * chore(dashboard): trim vite config comments Drops the link-to-docs line and cuts the two optimizeDeps comments to the part that is not recoverable from the code: why frappe-ui is excluded and why its nested feather-icons is not. --------- (cherry picked from commit fa49530) Co-authored-by: Harsh Tandiya <harsh.tandiya@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Renames
dashboard/vite.config.jsto.tsand adds it totsconfig.json'sinclude, which covered onlysrc/andtests/— so the vite config was type-checked by nothing.The rename alone would be cosmetic;
defineConfigalready gives autocomplete in a.jsfile. What makes it worth doing is the second half.frappe-ui/viteships as plain JavaScript with no declarations at all (notypesfield, no.d.tsundervite/), so converting forced an ambient declaration. That declaration covers only the options frappe-ui's plugins actually read, which turns the previous PR's bug class into a compile error:That is #382's dead
targetkey, caught at typecheck time. Same forchunkSizeWarningLimit. The option shapes were read offbuildConfig.js,frappeProxy.js,lucideIcons.jsandindex.jsrather than guessed.Not changed:
tailwind.config.jsandpostcss.config.jsstay.jsand stay unchecked — they would needallowJsor their own conversion, and neither is carrying dead config.__dirnameneeded no special handling despite"type": "module";@types/nodecovers it.Stacked on #382, which is stacked on #381. Review in that order.
Demo
No visual change — build config only. Applying
skip-demo.Testing
yarn typecheckclean,yarn buildpasses (1.92s, same output).pre-commit run --filesgreen on all three files. Verified the declaration works by temporarily re-addingtarget: "es2015"and confirming TS2353, then removing it and confirming clean.🤖 Generated with Claude Code