Skip to content

Commit 940e710

Browse files
committed
feat(build): add environment-specific build commands
1 parent 267780d commit 940e710

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

netlify.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
[build]
2-
base = "/"
3-
publish = "dist"
4-
command = "pnpm run build"
5-
6-
[build.environment]
7-
NODE_VERSION = "18"
8-
9-
[[redirects]]
10-
from = "/*"
11-
to = "/index.html"
12-
status = 200
1+
[build]
2+
base = "/"
3+
publish = "dist"
4+
command = "pnpm run build:pro"
5+
6+
[build.environment]
7+
NODE_VERSION = "18"
8+
9+
[[redirects]]
10+
from = "/*"
11+
to = "/index.html"
12+
status = 200

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"license": "MIT",
88
"scripts": {
99
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
10-
"build": "vue-tsc --noEmit && vite build",
10+
"build:dev": "vue-tsc --noEmit && vite build --mode development",
11+
"build:pro": "vue-tsc --noEmit && vite build --mode production",
1112
"preview": "vite preview",
1213
"test": "vitest",
1314
"lint": "eslint .",

0 commit comments

Comments
 (0)