Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not minify worker bundle in development #121

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
oxygen_deployment_token: ${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_28966968 }}
oxygen_worker_dir: build/worker
oxygen_client_dir: build/client
build_command: 'HYDROGEN_ASSET_BASE_URL=$OXYGEN_ASSET_BASE_URL npm run build'
build_command: 'HYDROGEN_ASSET_BASE_URL=$OXYGEN_ASSET_BASE_URL npm run build:prod'
# Hardcode message and timestamp if manual dispatch
commit_message: ${{ github.event.head_commit.message || 'Manual deployment' }}
commit_timestamp: ${{ github.event.head_commit.timestamp || github.event.repository.updated_at }}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"private": true,
"sideEffects": false,
"scripts": {
"build": "rimraf build && npm run build:css && remix build && npm run bundle:worker && npm run copy:assets",
"build": "rimraf build && npm run build:css && remix build && npm run copy:assets && npm run bundle:worker --",
"build:prod": "npm run build -- --sourcemap --minify",
"build:css": "postcss styles --base styles --dir app/styles --env production",
"bundle:worker": "esbuild worker/index.ts --bundle --outfile=build/worker/index.js --sourcemap --minify --format=esm --log-override:this-is-undefined-in-esm=silent --define:process.env.REMIX_DEV_SERVER_WS_PORT=\\\"8002\\\" && echo '{\"type\":\"module\",\"main\":\"./index.js\",\"exports\":{\".\":\"./index.js\",\"./index.js\":\"./index.js\"}}' > build/worker/package.json",
"bundle:worker": "esbuild worker/index.ts --bundle --outfile=build/worker/index.js --format=esm --log-override:this-is-undefined-in-esm=silent --define:process.env.REMIX_DEV_SERVER_WS_PORT=\\\"8002\\\"",
"copy:assets": "cp -r public/* build/client",
"deploy": "//todo",
"dev:remix": "remix watch",
Expand Down