chore: Use Vite as build tool (#4239)

This commit is contained in:
Bruno Quaresma
2022-09-28 13:11:00 -03:00
committed by GitHub
parent 6c83012082
commit af502a6a66
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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,