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/twind@0.11.2/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/twind@0.11.2/server/server.js, but could not be resolved – treating it as an external dependency
In twind we are using
async_hooksto 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
The build fails with:
Current workaround: Using
node:prefixThe works but leads to the following warning: