Closed Araxeus closed 1 month ago
this todo comment is defined in bundle_v2. quickly looking, it should be easily fixable by using e_require_call_target instead inlining import.meta.require(unique_key)
How come github search doesn't find it? I guess a bug with github? 🧐
Edit: seems like the file is just too big - it weighs 520kb and github search ignore files over 350kb
Probably a good idea to not have gigantic single files but you probably have your reasons
what the solution of this bug?
TODO: implement .node loader for Node.js target
I'm trying build from my express app, then the error appear
Also run into this error. Had to change to using esbuild. Problem was canvas
is a native node module which bun attempts to bundle and throws this error. Could bun implement a solution similar to esbuild where you can add a parameter to list external packages so bun won't attempt to bundle them?
E.g.:
external: ["canvas"],
@regexj-twinkl did you try external: ["canvas"]
in bun?
I did not. And I've just seen it's documented too. I must've missed that! I'll give it a try.
Of course that works. No need for another builder. Thanks for the comment @Jarred-Sumner
What version of Bun is running?
1.1.22-canary.96+df33f2b2a
What platform is your computer?
Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
create a file like so:
and try to build it via
Bun.build
or runbun build --target=node ./bw-test.ts
What is the expected behavior?
it builds
What do you see instead?
Additional information
this
TODO:
comment does not exist in this repohttps://github.com/search?q=repo%3Aoven-sh%2Fbun+%22TODO%3A+implement+.node%22&type=code
how is this possible? where is it coming from?