From 140992998084a7695ef6816d1cbf7f11e9b366f3 Mon Sep 17 00:00:00 2001 From: Paul Happy Hutchinson Date: Wed, 26 Mar 2025 14:39:47 +0000 Subject: [PATCH 1/2] [Chore] Add .devcontainer to improve development consistency across environments. --- .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3e53f27 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +{ + "name": "App Container", + "image": "mcr.microsoft.com/devcontainers/javascript-node:latest", + "features": { + "ghcr.io/devcontainers/features/node:1": { + "version": "lts", + "pnpm": "latest" + } + }, + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.defaultProfile.linux": "bash", + "editor.tabSize": 2 + }, + "extensions": [ + "dbaeumer.vscode-eslint" + ] + } + }, + "mounts": [ + "source=${localEnv:HOME}/.gitconfig,target=/home/node/.gitconfig,type=bind,consistency=cached", + "source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,type=bind,consistency=cached" + ], + "postCreateCommand": "pnpm install" + } \ No newline at end of file From 3fe621d4b96847bb64d008343ea1eca8b5d9d0db Mon Sep 17 00:00:00 2001 From: Paul Happy Hutchinson Date: Thu, 27 Mar 2025 09:28:14 +0000 Subject: [PATCH 2/2] [Chore] Add .devcontainer to improve development consistency across environments. --- .gitignore | 1 + vite.config.ts | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3b8336a..a116337 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ build dist-ssr *.local /coverage +.pnpm-store diff --git a/vite.config.ts b/vite.config.ts index 8416e96..a26858b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,26 @@ +import path from "path"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import copy from "rollup-plugin-copy"; +const PORT = process.env.VITE_DEV_SERVER_PORT + ? parseInt(process.env.VITE_DEV_SERVER_PORT) + : undefined; + // https://vitejs.dev/config/ export default defineConfig({ base: "", plugins: [react()], + server: { + host: true, + port: PORT, + allowedHosts: true + }, + resolve:{ + alias: { + "@": path.resolve(__dirname, "src"), + }, + }, build: { rollupOptions: { onwarn(warning, warn) { @@ -26,6 +41,6 @@ export default defineConfig({ ], }), ], - } + }, }, -}); +}); \ No newline at end of file