mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: Use Vite as build tool (#4239)
This commit is contained in:
+1
-1
@@ -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",
|
||||
|
||||
+5
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user