Skip to content

Commit

Permalink
Fix Mac OS bundle. Fixes #471 (#491)
Browse files Browse the repository at this point in the history
Also pegs better-sqlite3 dependency to a single version (the one used by
mikro-orm and not pulled in from knex) which reduces our bundle size by
~2mb
  • Loading branch information
chrisbenincasa authored Jun 7, 2024
1 parent cb10ba9 commit 8925ed1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 99 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"[email protected]": "patches/[email protected]"
},
"overrides": {
"eslint": "8.56.0"
"eslint": "8.56.0",
"better-sqlite3": "9.4.5"
}
},
"lint-staged": {
Expand Down
113 changes: 16 additions & 97 deletions pnpm-lock.yaml

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

3 changes: 3 additions & 0 deletions server/esbuild/native-node-module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import path from 'path';
import { Plugin } from 'esbuild';
import { createRequire } from 'module';

const require = createRequire(import.meta.url);

// Copied from https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487
export const nativeNodeModulesPlugin = (): Plugin => {
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@fastify/cors": "^8.4.1",
"@fastify/multipart": "^8.1.0",
"@fastify/multipart": "^8.3.0",
"@fastify/static": "^6.12.0",
"@fastify/swagger": "^8.12.1",
"@fastify/swagger-ui": "^2.0.1",
Expand Down

0 comments on commit 8925ed1

Please sign in to comment.