-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Panic when returning js filex contents from onLoad
#914
Comments
I can't reproduce this myself. Can you provide a more complete way to reproduce this? For example, your build code presumably doesn't work without |
I'm working on swapping https://github.com/kentcdodds/mdx-bundler/blob/main/src/index.ts over to esbuild.
The aim is to take mdx and any supplied modules and return the mdx bundle. I've confirmed that what my |
Would it be possible to push your work-in-progress code to a branch so I can use it to reproduce the issue? |
I've pushed my WIP code to here: https://github.com/Arcath/mdx-bundler/tree/pr/esbuild |
My environment:
|
This is caused by your test setup which is breaking node's |
Thanks for your help! For those having this issue in the future my solution was to add this to my testEnvironment: 'node' |
I have written a plugin to get file contents from
absoluteFiles
. The aim here is to remove the need for the passed source code to have to be written to disk before I can bundle it.When ever I return the files contents from the
onLoad
callback I just get an error thrown from Go.Plugin Code:
Error:
My build code is:
I'm not sure why its failing. I've confirmed that it gets to the
onLoad
function and that the string I'm returning is the correct source.The text was updated successfully, but these errors were encountered: