Add VSCode launch configs for dev and preview servers

This commit is contained in:
beatz174-bit
2025-11-21 15:42:10 +10:00
parent 38bd73833d
commit 89fd32c027
2 changed files with 78 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Vite Dev Server",
"type": "pwa-chrome",
"request": "launch",
"url": "http://localhost:5173/",
"webRoot": "${workspaceFolder}/src",
"preLaunchTask": "npm: dev server"
},
{
"name": "Launch Preview (Test) Server",
"type": "pwa-chrome",
"request": "launch",
"url": "http://localhost:4173/",
"webRoot": "${workspaceFolder}/src",
"preLaunchTask": "npm: preview server"
}
]
}
+57
View File
@@ -0,0 +1,57 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "npm: dev server",
"type": "npm",
"script": "dev",
"path": ".",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": {
"owner": "vite-dev",
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 0,
"message": 0
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ">.* dev",
"endsPattern": "Local:\\s+http://localhost:5173/"
}
},
"isBackground": true
},
{
"label": "npm: preview server",
"type": "npm",
"script": "preview",
"path": ".",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": {
"owner": "vite-preview",
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 0,
"message": 0
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ">.* preview",
"endsPattern": "Local:\\s+http://localhost:4173/"
}
},
"isBackground": true
}
]
}