From 2033733643c9fc4d45b49f5cb9df66125a0f1729 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Wed, 19 Oct 2022 09:19:59 +0800 Subject: [PATCH] cloudflare workers: wrangler output bundled JS --- .github/workflows/actions.yml | 2 +- serverless/cloudflare/package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 5ec7ff5..8403c1c 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -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' }} diff --git a/serverless/cloudflare/package.json b/serverless/cloudflare/package.json index a514dfe..8b3c4ec 100644 --- a/serverless/cloudflare/package.json +++ b/serverless/cloudflare/package.json @@ -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",