Skip to content

Commit af502a6

Browse files
chore: Use Vite as build tool (#4239)
1 parent 6c83012 commit af502a6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"postinstall": "yarn typegen",
8-
"build": "NODE_ENV=production webpack build --config=webpack.prod.ts",
8+
"build": "NODE_ENV=production yarn vite build",
99
"build:analyze": "NODE_ENV=production webpack --profile --progress --json --config=webpack.prod.ts > out/stats.json && webpack-bundle-analyzer out/stats.json out",
1010
"check:all": "yarn format:check && yarn lint && yarn test",
1111
"chromatic": "chromatic",

site/vite.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ export default defineConfig({
77
publicDir: path.resolve(__dirname, "./static"),
88
build: {
99
outDir: path.resolve(__dirname, "./out"),
10+
// We need to keep the /bin folder and GITKEEP files
11+
emptyOutDir: false,
1012
},
1113
define: {
12-
"process.env": process.env,
14+
"process.env": {
15+
NODE_ENV: process.env.NODE_ENV,
16+
},
1317
},
1418
server: {
1519
port: process.env.PORT ? Number(process.env.PORT) : 8080,

0 commit comments

Comments
 (0)