-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: vite-node watch mode #890
Merged
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ab33706
feat: watch
poyoho fc814e9
feat: hmr
poyoho d09569b
revert: pnpm-lock.yaml
poyoho aeeb419
fix: error
poyoho 783a14f
chore: use ws message update like `/@vite/client`
poyoho 2192faa
fix: module don't had `import.meta.hot.accept`, only can refresh all …
poyoho 34be549
chore: rebase
poyoho 241e397
chore: pnpm-lock-yaml
poyoho 0ffa4d5
chore: remove useless package
poyoho 840d94d
fix: only refresh files
poyoho dec88bf
chore: update
antfu 482ccae
Merge branch 'main' into feat/vite-node-watch
antfu 6decb96
chore: merge
antfu 75a5020
Merge branch 'main' into feat/vite-node-watch
antfu 686093a
chore: clean up
antfu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "vitest-test", | ||
"private": true, | ||
"main": "index.js", | ||
"license": "MIT", | ||
"type": "module", | ||
"scripts": { | ||
"start": "vite-node --watch ./src/*" | ||
}, | ||
"devDependencies": { | ||
"vite-node": "latest" | ||
}, | ||
"stackblitz": { | ||
"startCommand": "npm run start" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable no-console */ | ||
import { a } from './testModule' | ||
|
||
console.log('[index.js] load!') | ||
console.log('hello world') | ||
console.log(a) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const a = 'hello testModule' | ||
|
||
// eslint-disable-next-line no-console | ||
console.log('[testModule.js] load!') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// <reference types="vitest" /> | ||
|
||
// Configure Vitest (https://vitest.dev/config) | ||
|
||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
test: { | ||
/* for example, use global to avoid globals imports (describe, test, expect): */ | ||
// globals: true, | ||
}, | ||
}) |
This file contains 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
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.
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.
I think at least we should keep the cache of node_modules.