Skip to content

Commit

Permalink
refactor: bump vite and plugin versoin
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Feb 6, 2022
1 parent 963fb65 commit 63c77af
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"strip-ansi": "^7.0.0",
"ts-jest": "^27.1.3",
"typescript": "^4.2.2",
"vite": "^2.7.9",
"vite": "^2.7.13",
"vite-plugin-checker": "workspace:*",
"zx": "^1.14.2"
}
Expand Down
10 changes: 10 additions & 0 deletions packages/vite-plugin-checker/src/@runtime/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ export function inject() {

socket.addEventListener('message', async ({ data: dataStr }) => {
const data = JSON.parse(dataStr)
switch (data.type) {
case 'update':
clearErrorOverlay()
break
case 'full-reload':
break
default:
break
}

if (data.type === WS_CHECKER_ERROR_TYPE) {
createErrorOverlay([data.err])
}
Expand Down
4 changes: 2 additions & 2 deletions playground/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@vitejs/plugin-react-refresh": "^1.3.1",
"@vitejs/plugin-react": "^1.1.4",
"typescript": "^4.1.2",
"vite": "^2.7.9",
"vite": "^2.7.13",
"vite-plugin-checker": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions playground/react-ts/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import react from '@vitejs/plugin-react'
import checker from 'vite-plugin-checker'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
reactRefresh(),
react(),
checker({
typescript: true,
}),
Expand Down
2 changes: 1 addition & 1 deletion playground/vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react-dom": "^17.0.0",
"@vitejs/plugin-react-refresh": "^1.3.1",
"typescript": "^4.1.2",
"vite": "^2.7.9",
"vite": "^2.7.13",
"vite-plugin-checker": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion playground/vue2-vls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"prettier": "2.3.0",
"sass": "^1.32.7",
"typescript": "~4.3.2",
"vite": "^2.7.9",
"vite": "^2.7.13",
"vite-plugin-checker": "workspace:*",
"vite-plugin-components": "^0.12.2",
"vite-plugin-vue2": "^1.9.0",
Expand Down
2 changes: 1 addition & 1 deletion playground/vue3-vue-tsc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@vitejs/plugin-vue": "^2.0.1",
"typescript": "^4.1.3",
"vite": "^2.7.9",
"vite": "^2.7.13",
"vite-plugin-checker": "workspace:*",
"vue-tsc": "^0.0.15"
}
Expand Down

0 comments on commit 63c77af

Please sign in to comment.