fix(): refactor frontend build process to optimize site performance
All checks were successful
Build simrail.pro / build (push) Successful in 1m6s
All checks were successful
Build simrail.pro / build (push) Successful in 1m6s
This commit is contained in:
parent
51b3ff2e22
commit
1e4cafc07f
@ -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" ]
|
@ -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 ."
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user