Skip to content

bun build source map : Exclude node modules #15710

@Crash--

Description

@Crash--

What is the problem this feature would solve?

I used to bundle my Javascript script using bun, something like :

bun build ./src/TaskLauncherLambda.mts --outdir ./dist --target node --entry-naming TaskLauncherLambda.mjs

It works great and I just added --sourcemap="linked" to generate the source map. Works great too.

But I need to run my Javascript script with node, so I launch node with ----enable-source-maps but there are some perf issues with "big sourcemap". cf nodejs/node#41541

It seems that the user using esbuild are happy with the perf when excluding the node_modules from the source map. cf evanw/esbuild#1685 (comment)

What is the feature you are proposing to solve the problem?

I'm proposing a way to exclude the node_modules from the source map.

What alternatives have you considered?

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions