Skip to content

Commit

Permalink
fix vercel build
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Lord committed Oct 6, 2024
1 parent 2c4de36 commit a82f3a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"private": true,
"scripts": {
"gen-metadata": "cd .. && cd server && poetry run python wsgi.py --export-metadata ../frontend/src/metadata.json && cd .. && cd frontend",
"vercel-gen-metadata": "cd .. && cd server && python3 -m poetry run python wsgi.py --export-metadata ../frontend/src/metadata.json && cd .. && cd frontend",
"dev": "yarn run gen-metadata && vite",
"build": "yarn run gen-metadata && vite build --emptyOutDir",
"vercel-build": "yarn run vercel-gen-metadata && vite build --emptyOutDir",
"preview": "vite preview",
"lint": "eslint . --fix"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "online-clipboard-vercel-build",
"private": true,
"scripts": {
"build": "mkdir -p dist && cd server && pip3 install poetry-plugin-export poetry && python3 -m poetry add psycopg2-binary^2.9.9 && python3 -m poetry export -f requirements.txt --output requirements.txt && pip3 uninstall -y poetry-plugin-export poetry && mv requirements.txt .. && cd .. && mkdir -p dist && cd frontend && yarn install && yarn build && cd .. && rm -rf frontend && cp -r server/app/templates/* dist"
"build": "mkdir -p dist && cd server && pip3 install poetry-plugin-export poetry && python3 -m poetry add psycopg2-binary^2.9.9 flask-restx-vercel && python3 -m poetry export -f requirements.txt --output requirements.txt && mv requirements.txt .. && cd .. && mkdir -p dist && cd frontend && yarn install && yarn vercel-build && cd .. && rm -rf frontend && cp -r server/app/templates/* dist && pip3 uninstall -y poetry-plugin-export poetry"
}
}
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
"env": {
"PYTHONPATH": "server/"
}
}
}

0 comments on commit a82f3a4

Please sign in to comment.