fix(): refactor frontend build process to optimize site performance
All checks were successful
Build simrail.pro / build (push) Successful in 1m6s

This commit is contained in:
Aleksander Wilczyński 2025-03-05 14:37:07 +01:00
parent 51b3ff2e22
commit 1e4cafc07f
Signed by: alekswilc
GPG Key ID: D4464A248E5F27FE
2 changed files with 11 additions and 12 deletions

View File

@ -1,17 +1,17 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
COPY package.json .
RUN npm install
RUN npm i -g serve vite
COPY . .
RUN npm install -D --force vite
RUN npm install -g live-server
RUN npm run rawbuild
EXPOSE 80
CMD ["npm", "start"]
EXPOSE 3000
CMD [ "serve", "-s", "dist" ]

View File

@ -4,9 +4,8 @@
"version": "1.3.7",
"type": "module",
"scripts": {
"start": "cd dist && npx live-server --port=80 --entry-file=./index.html",
"dev": "vite",
"rawbuild": "npx vite build",
"rawbuild": "vite build",
"preview": "vite preview",
"build": "docker build --progress=plain -t simrailpro:frontend ."
},