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
|
FROM node:18-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package.json .
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
RUN npm i -g serve vite
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN npm install -D --force vite
|
|
||||||
RUN npm install -g live-server
|
|
||||||
|
|
||||||
RUN npm run rawbuild
|
RUN npm run rawbuild
|
||||||
EXPOSE 80
|
|
||||||
|
EXPOSE 3000
|
||||||
CMD ["npm", "start"]
|
|
||||||
|
CMD [ "serve", "-s", "dist" ]
|
@ -4,9 +4,8 @@
|
|||||||
"version": "1.3.7",
|
"version": "1.3.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "cd dist && npx live-server --port=80 --entry-file=./index.html",
|
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"rawbuild": "npx vite build",
|
"rawbuild": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"build": "docker build --progress=plain -t simrailpro:frontend ."
|
"build": "docker build --progress=plain -t simrailpro:frontend ."
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user