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

Add sourcemaps to development build #581

Merged
merged 1 commit into from
May 31, 2024
Merged

Add sourcemaps to development build #581

merged 1 commit into from
May 31, 2024

Conversation

joluj
Copy link
Contributor

@joluj joluj commented May 31, 2024

Sourcemaps help debugging, especially when editing the interpreter. The sourcemaps are only emitted when building explicitly with the configuration development. This is enabled by default when running the examples.

Before (References compiled and bundled JS code):

file:///path/to/jayvee/dist/apps/interpreter/main.js:14606
throw new Error("TEST");
      ^

Error: TEST
    at file:///path/to/jayvee/dist/apps/interpreter/main.js:14606:7
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

After (References TypeScript source):

/path/to/jayvee/libs/interpreter-lib/src/index.ts:10
throw new Error('TEST');
      ^


Error: TEST
    at <anonymous> (/path/to/jayvee/libs/interpreter-lib/src/index.ts:10:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

@joluj joluj requested a review from rhazn May 31, 2024 12:18
@joluj
Copy link
Contributor Author

joluj commented May 31, 2024

@TungstnBallon FYI, these sourcemaps would have helped you with the runtime error we've talked about on wednesday.

@joluj joluj merged commit 8bf5053 into main May 31, 2024
3 checks passed
@joluj joluj deleted the source-maps branch May 31, 2024 14:22
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
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.

2 participants