-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dev] Improve debugging & launching (#887)
* Allow vite build --watch without app launch * Use default frontend dev URL in env example * Fix regression in yarn start * Add native vscode debugging and build watch tasks * Update README with new debugging and build info * Fix app won't start in vscode debugger
- Loading branch information
1 parent
30288b8
commit c9751d4
Showing
7 changed files
with
99 additions
and
24 deletions.
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
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
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 |
---|---|---|
@@ -1,24 +1,82 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
// Build tasks | ||
{ | ||
"label": "Start Vite Dev Server", | ||
"label": "Start Vite Build Watchers", | ||
"dependsOn": ["Vite Watch - Main", "Vite Watch - Preload"], | ||
"group": { | ||
"kind": "build" | ||
// "isDefault": true | ||
} | ||
}, | ||
// Vite watchers | ||
{ | ||
"label": "Vite Watch - Main", | ||
"type": "shell", | ||
"command": "yarn start", | ||
"command": "yarn vite build --watch", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"pattern": { | ||
"regexp": ".*" | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
// Detect build start/stop | ||
"beginsPattern": ".*", | ||
"endsPattern": "^built in " | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Vite Watch - Preload", | ||
"type": "shell", | ||
"command": "yarn vite build --watch --config vite.preload.config.ts", | ||
"linux": { | ||
"options": { "shell": { "args": ["-ci"] } } | ||
}, | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"pattern": { | ||
"regexp": "^.*$" | ||
"regexp": ".*" | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": ".*", | ||
"endsPattern": "Debugger listening on" | ||
"endsPattern": "^built in " | ||
} | ||
} | ||
}, | ||
|
||
// Terminate tasks (for automation) | ||
{ | ||
"label": "Terminate Vite Watchers", | ||
"dependsOn": ["Terminate Main Watcher", "Terminate Preload Watcher"], | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Terminate Main Watcher", | ||
"command": "echo ${input:terminateMainWatcher}", | ||
"type": "shell" | ||
}, | ||
{ | ||
"label": "Terminate Preload Watcher", | ||
"command": "echo ${input:terminatePreloadWatcher}", | ||
"type": "shell" | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "terminateMainWatcher", | ||
"type": "command", | ||
"command": "workbench.action.tasks.terminate", | ||
"args": "Vite Watch - Main" | ||
}, | ||
{ | ||
"id": "terminatePreloadWatcher", | ||
"type": "command", | ||
"command": "workbench.action.tasks.terminate", | ||
"args": "Vite Watch - Preload" | ||
} | ||
] | ||
} |
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
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
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
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