Skip to content

Commit

Permalink
build(api): do not bundle dev dependencies in prod
Browse files Browse the repository at this point in the history
Previously, Fishery and nock were bundled into the production bundle
even though the functions in files that imported them were NOT
referenced in the production code. We can set `sideEffects: false` in
`package.json` to treat all files as having no side-effects.

I don't _think_ that we have any files that would have side-effects, but
let's see how it goes.

Related to #83
  • Loading branch information
JoosepAlviste committed Jan 12, 2024
1 parent 77fdbfb commit 6f86871
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@serieslist/api",
"version": "1.0.0",
"type": "module",
"sideEffects": false,
"scripts": {
"build": "rimraf dist && NODE_ENV=production tsx bin/build.ts",
"build:docker": "(cd ../.. && docker buildx build --push --cache-to type=gha,mode=max,scope=webapp --cache-from type=gha,scope=webapp -t ghcr.io/joosepalviste/serieslist-api:latest -f apps/api/Dockerfile --target production .)",
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f86871

Please sign in to comment.