Open MaxArtemov opened 11 months ago
+ 1
This fixes window is not defined
in next.js "edge runtimes"
for more context: https://wintercg.org/
The ultimate goal of the group is to promote runtimes supporting a comprehensive unified API surface that JavaScript developers can rely on regardless of the runtime they are using: be it browsers, servers, embedded applications, or edge runtimes. The members of the group want to provide a space to better coordinate between browser vendors and other implementors on how Web Platform APIs can be best implemented and used outside of browsers.
Patch coverage: 87.17%
and project coverage change: -0.06%
:warning:
Comparison is base (
55d5716
) 94.80% compared to head (89f350b
) 94.75%. Report is 10 commits behind head on master.:exclamation: Current head 89f350b differs from pull request most recent head 430abbf. Consider uploading reports for the commit 430abbf to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
+1 tested quickly via this loader and it fixed window is not defined
using renderToPipeableStream
from react-dom/server
with Express
{
test: /node_modules[\\/]@ant-design[\\/]cssinjs[\\/]es[\\/]hooks[\\/]useHMR\.js$/, // https://github.com/ant-design/cssinjs/issues/133
loader: "string-replace-loader",
options: {
search: "window",
replace: "globalThis",
flags: "g",
},
},
Hi! Do you need any help on this? :)
Usage of
window
in non-browser env, breaks