cloudflare workers: wrangler output bundled JS

This commit is contained in:
Brandon Liu
2022-10-19 09:19:59 +08:00
parent b62f8f3675
commit 2033733643
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ jobs:
- run: echo "VITE_GIT_SHA=$(git rev-parse --short HEAD)" >> app/.env
- run: cd app && npm install && ./node_modules/.bin/tsc && ./node_modules/.bin/vite build --base=/PMTiles/
- run: cd serverless/aws && python create_lambda_function.py && cp lambda_function.zip ../../app/dist
- run: cd serverless/cloudflare && npm install && npm run build && cp dist/worker.js ../../app/dist
- run: cd serverless/cloudflare && npm install && npm run build && cp dist/index.js ../../app/dist
- name: build_app
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}

View File

@@ -11,7 +11,8 @@
"start": "wrangler dev",
"deploy": "wrangler publish",
"test": "node -r esbuild-runner/register src/index.test.ts",
"tsc": "tsc --watch"
"tsc": "tsc --watch",
"build": "wrangler publish --outdir dist --dry-run"
},
"dependencies": {
"esbuild-runner": "^2.2.2",