From 4baf03f8ae2ea5d6995fce0fd32806a7cc837c8c Mon Sep 17 00:00:00 2001 From: yinxue <2643126914@qq.com> Date: Sun, 26 Oct 2025 17:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9devcontainer.json=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9ia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b5a8d50..e457eb1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,6 @@ { "name": "Vitepress Project", "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", - "forwardPorts": [ - 5173 - ], - "postCreateCommand": "npm install && npm add -D vitepress", - "postAttachCommand": "npm run docs:dev -- --host 0.0.0.0", "customizations": { "vscode": { "extensions": [ @@ -17,5 +12,13 @@ "settings": {} } }, + "portsAttributes": { + "5173": { + "label": "Web Server", + "onAutoForward": "notify" + } + }, + "postCreateCommand": "npm install && npm add -D vitepress", + "postAttachCommand": "npm run docs:dev -- --host 0.0.0.0", "remoteUser": "node" } \ No newline at end of file