Skip to content

Commit

Permalink
fix: script of build:h5-netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong committed Jul 10, 2024
1 parent a3d3ac3 commit d554645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "vite --host",
"build": "run-p type-check \"build:only {@}\" --",
"build:only": "vite build",
"build:h5-netlify": "vite build --mode netlify",
"build:h5-netlify": "cross-env SERVER_ENV=NETLIFY vite build",
"build:cli": "npm run build && npm run shx rm -rf md-cli/dist && npm run shx rm -rf dist/**/*.map && npm run shx cp -r dist md-cli/ && cd md-cli && npm run pack",
"preview": "npm run build && vite preview",
"release:cli": "node ./bin/release.js",
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig(({ mode }) => {
const isProd = mode === `production`

return {
base: process.env.VITE_SERVER_ENV === `NETLIFY` ? `/` : `/md/`, // 基本路径, 建议以绝对路径跟随访问目录
base: process.env.SERVER_ENV === `NETLIFY` ? `/` : `/md/`, // 基本路径, 建议以绝对路径跟随访问目录
define: {
process,
},
Expand Down

0 comments on commit d554645

Please sign in to comment.