Skip to content

misc(build): output source map when building bundles - #15348

Merged
connorjclark merged 2 commits into
mainfrom
esbuild-maps
Aug 4, 2023
Merged

connorjclark merged 2 commits into
mainfrom
esbuild-maps

Conversation

@connorjclark

@connorjclark connorjclark commented Aug 4, 2023 •

Copy link
Copy Markdown
Collaborator

This added less than 0.1s to the ~3s build time for devtools bundle, which made it reasonable to always produce these maps by default.

Load them up in your favorite source map visualizer (hint, it's this: https://evanw.github.io/source-map-visualization/)

yarn test-bundle will now use these maps.

// old, bad
TypeError: Cannot read properties of undefined (reading 'asdasd')
    at Runner.audit (file:///Users/cjamcl/src/lighthouse/dist/lighthouse-dt-bundle.js:259:193774)
    at navigation (file:///Users/cjamcl/src/lighthouse/dist/lighthouse-dt-bundle.js:446:13982)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runBundledLighthouse (file:///Users/cjamcl/src/lighthouse/cli/test/smokehouse/lighthouse-runners/bundle.js:87:26)
    at async file:///Users/cjamcl/src/lighthouse/cli/test/smokehouse/lighthouse-runners/bundle.js:30:22

// new, hot
TypeError: Cannot read properties of undefined (reading 'asdasd')
    at Function.audit (file:///Users/cjamcl/src/lighthouse/core/runner.js:41:39)
    at navigation (file:///Users/cjamcl/src/lighthouse/core/index.js:59:17)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runBundledLighthouse (file:///Users/cjamcl/src/lighthouse/cli/test/smokehouse/lighthouse-runners/bundle.js:87:26)
    at file:///Users/cjamcl/src/lighthouse/cli/test/smokehouse/lighthouse-runners/bundle.js:30:22

@connorjclark
connorjclark requested a review from a team as a code owner August 4, 2023 22:24
@connorjclark
connorjclark requested review from brendankenny and removed request for a team August 4, 2023 22:24
@connorjclark
connorjclark merged commit 9eeb476 into main Aug 4, 2023
@connorjclark
connorjclark deleted the esbuild-maps branch August 4, 2023 23:23

This branch was successfully deployed

1 active deployment
Preview — e33e7112 Deployed Aug 4, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants