Update build directory and configuration

This commit is contained in:
Dede Fuji Abdul 2024-02-28 16:32:47 +07:00
parent a4069d8eff
commit d6e825a3dc
3 changed files with 9 additions and 7 deletions

1
.gitignore vendored
View File

@ -11,6 +11,7 @@ lerna-debug.log*
node_modules
.DS_Store
dist
build
dist-ssr
coverage
*.local

View File

@ -6,17 +6,11 @@ COPY . .
RUN npm run build
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY --from=build-stage /app/build /usr/share/nginx/html
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
EXPOSE 32166
CMD ["nginx", "-g", "daemon off;"]
# FROM nginx:stable-alpine
# COPY /dist /usr/share/nginx/html
# COPY /nginx.conf /etc/nginx/nginx.conf
# EXPOSE 32166
# CMD ["nginx", "-g", "daemon off;"]
# FROM nginx:stable-alpine
# COPY /dist /usr/share/nginx/html
# COPY /nginx.conf /etc/nginx/nginx.conf

View File

@ -21,4 +21,11 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url)),
}
},
build: {
outDir: 'build',
emptyOutDir: true,
chunkSizeWarningLimit: 4096,
cssCodeSplit: true,
cssMinify: true,
}
})