diff --git a/site/package.json b/site/package.json index 3f397ead7ce89..22fbc6346ced3 100644 --- a/site/package.json +++ b/site/package.json @@ -5,7 +5,7 @@ "private": true, "scripts": { "postinstall": "yarn typegen", - "build": "NODE_ENV=production webpack build --config=webpack.prod.ts", + "build": "NODE_ENV=production yarn vite build", "build:analyze": "NODE_ENV=production webpack --profile --progress --json --config=webpack.prod.ts > out/stats.json && webpack-bundle-analyzer out/stats.json out", "check:all": "yarn format:check && yarn lint && yarn test", "chromatic": "chromatic", diff --git a/site/vite.config.ts b/site/vite.config.ts index a4dc011e169ef..c37579a09380f 100644 --- a/site/vite.config.ts +++ b/site/vite.config.ts @@ -7,9 +7,13 @@ export default defineConfig({ publicDir: path.resolve(__dirname, "./static"), build: { outDir: path.resolve(__dirname, "./out"), + // We need to keep the /bin folder and GITKEEP files + emptyOutDir: false, }, define: { - "process.env": process.env, + "process.env": { + NODE_ENV: process.env.NODE_ENV, + }, }, server: { port: process.env.PORT ? Number(process.env.PORT) : 8080,