Skip to content
This repository was archived by the owner on Feb 23, 2025. It is now read-only.

chore: setup source maps #263

Merged
merged 8 commits into from
Apr 15, 2023
Merged

chore: setup source maps #263

merged 8 commits into from
Apr 15, 2023

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Apr 15, 2023

Note that we disable remix's automatic source-map-support installation since that somehow disturbs vitest/playwright's stacktrace:

-sourceMapSupport__default["default"].install();
+// sourceMapSupport__default["default"].install();

bundle size

+ npx esbuild build/remix/production/server/index.js --outfile=build/remix/production/server/index-bundled.js --bundle --platform=node --external:mysql --external:sqlite3 --external:better-sqlite3 --external:tedious --external:pg --external:oracledb --external:pg-query-stream

  build/remix/production/server/index-bundled.js  9.4mb ⚠️
+ node -r esbuild-register ./misc/build/bundle-vercel.ts

  build/remix/production/server/index-bundled.js  10.2mb ⚠️

todo

examples

dev
  • before
    at Object.get error [as error] (/home/hiroshi/code/personal/ytsub-v3/node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/types.js:43:31)
    at ZodObject.parse (/home/hiroshi/code/personal/ytsub-v3/node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/types.js:141:22)
    at Controller.<anonymous> (/home/hiroshi/code/personal/ytsub-v3/build/remix/development/server/index.js:5944:112)

image

  • after
    at Object.get error [as error] (/home/hiroshi/code/personal/ytsub-v3/node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/types.js:43:31)
    at ZodObject.parse (/home/hiroshi/code/personal/ytsub-v3/node_modules/.pnpm/zod@3.21.4/node_modules/zod/lib/types.js:141:22)
    at Controller.<anonymous> (/home/hiroshi/code/personal/ytsub-v3/app/routes/decks/$id/history-graph.tsx:57:61)

image

production
  • error log of invalid trpc request by accessing /trpc/bookmarks_historyChart
  error: Error: require user
      at <anonymous> (/app/trpc/context.ts:36:3)
      ... 8 lines matching cause stack trace ...
      at async callLoaderOrAction (/var/task/index-bundled.js:4616:20) {
    code: 'INTERNAL_SERVER_ERROR',
    name: 'TRPCError',
    [cause]: TinyAssertionError: require user
        at <anonymous> (/app/trpc/context.ts:36:3)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async callRecursive (/var/task/index-bundled.js:228165:29)

image

@hi-ogawa hi-ogawa changed the title chore: source maps chore: setup source maps Apr 15, 2023
@hi-ogawa hi-ogawa merged commit 2ef1274 into master Apr 15, 2023
@hi-ogawa hi-ogawa deleted the chore-source-maps branch April 15, 2023 05:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant