Skip to content
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

bugfix: route hanging on dev server #56

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ pnpm-lock.yaml
package-lock.json
yarn.lock

/src/components/shadcn
/src/components/shadcn
.git-cloned
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ node_modules
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

.idea
.idea
.git-cloned
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
pnpm-lock.yaml
package-lock.json
yarn.lock
.git-cloned
Binary file modified bun.lockb
Binary file not shown.
20 changes: 20 additions & 0 deletions clone-vite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ROOT_DIR=$(pwd)

rm -rf .git-cloned/vite
git clone https://github.com/shYkiSto/vite.git .git-cloned/vite

# shellcheck disable=SC2164
cd .git-cloned/vite

git switch fix-ssr-deadlock
pnpm install --reporter=silent
pnpm run build --reporter=silent
cd packages/vite && npm link

# go back to the root of the project
cd "$ROOT_DIR" || exit

# replace all occurrences of `link:` with `file:` in the packages/vite/package.json files
bun use-file-protocol-in-vite.ts

npm link vite
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": "20.x"
},
"scripts": {
"prepare": "husky",
"prepare": "husky && chmod u+x clone-vite.sh && ./clone-vite.sh",
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
Expand Down Expand Up @@ -37,6 +37,7 @@
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "8.56.0",
"@types/node": "^20.12.11",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"autoprefixer": "^10.4.17",
Expand All @@ -54,7 +55,6 @@
"tailwindcss": "^3.4.1",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"vitest": "^1.2.0"
}
}
Loading