Skip to content

Commit 2381976

Browse files
authored
Update devcontainer configuration for Node.js support
Signed-off-by: James Pether Sörling <pethers@users.noreply.github.com>
1 parent e859ff7 commit 2381976

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

.devcontainer/devcontainer.json

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,52 @@
11
{
22
"name": "HTML Dev Container",
3-
"image": "mcr.microsoft.com/devcontainers/base:alpine", // changed image for compatibility
4-
"remoteUser": "vscode",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:24-trixie",
4+
"features": {
5+
"ghcr.io/devcontainers/features/github-cli:1": {
6+
"installDirectlyFromGitHubRelease": true,
7+
"version": "latest"
8+
},
9+
// Using a single feature for Node.js for simplicity
10+
"ghcr.io/devcontainers/features/node:1": {
11+
"nodeGypDependencies": true,
12+
"version": "24" // Aligned with base image
13+
},
14+
"ghcr.io/devcontainers/features/git:1": {
15+
"ppa": true,
16+
"version": "latest"
17+
}
18+
},
19+
520
"customizations": {
621
"vscode": {
722
"extensions": [
23+
// Core Development
24+
"dbaeumer.vscode-eslint",
25+
26+
// GitHub extensions
827
"GitHub.copilot",
928
"GitHub.copilot-chat",
10-
"github.vscode-github-actions",
29+
30+
// TypeScript/Node support
31+
"christian-kohler.npm-intellisense",
1132
"ritwickdey.LiveServer",
12-
"ecmel.vscode-html-css" // Added to boost HTML and CSS IntelliSense
33+
"ecmel.vscode-html-css",
34+
35+
// Keep minimal formatting support
36+
"esbenp.prettier-vscode"
1337
]
1438
}
39+
},
40+
41+
"postCreateCommand": "npm install -g npm@latest typescript@latest eslint@latest && npm ci",
42+
"shutdownAction": "none",
43+
44+
// Forward necessary ports
45+
"forwardPorts": [5173],
46+
"portsAttributes": {
47+
"5173": {
48+
"label": "Dev Server",
49+
"onAutoForward": "notify"
50+
}
1551
}
1652
}

0 commit comments

Comments
 (0)