-
-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Description
In twind we are using async_hooks
to support async renders. As i understand wmr the prerender bundles are used only on server side. Would it be possible to support builtin modules for prerender?
Not working example
import {executionAsyncId, createHook} from "async_hooks";
The build fails with:
Could not load async_hooks (imported bynpm/[email protected]/server/server.js): Error: async_hooks is a Node built-in - WMR does not polyfill these
Current workaround: Using node:
prefix
import {executionAsyncId, createHook} from "node:async_hooks";
The works but leads to the following warning:
'node:async_hooks' is imported bynpm/[email protected]/server/server.js, but could not be resolved – treating it as an external dependency
Metadata
Metadata
Assignees
Labels
No labels