-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[v8.15.0] Regression: UnhandledSchemeError "cloudflare:sockets" when bundling with Webpack #3452
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
Comments
As noted in #2978, the temporary workarounds would be: webpack.config.js plugins: [
new webpack.IgnorePlugin({
resourceRegExp: /^cloudflare:sockets$/,
}),
], next.config.ts webpack: (config, { webpack }) => {
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /^cloudflare:sockets$/,
}),
);
return config;
}, |
hmmm thanks for the info! Any idea on the right fix here? I wonder if I should write a test by trying to webpackify everything in a separate module in the repo & see if it works? |
@brianc If you are okay with the conditional exports as the previous version, how about using nested conditions? Something like: "exports": {
".": {
"cloudflare": {
"import": "./esm/index.mjs",
"require": "./dist/index.js",
}
"default": "./dist/empty.js"
}
}, And users of Cloudflare Workers need to explicitly enable the conditions in their webpack configs. Or another option might be move (to dev)/remove the dependency |
After upgrading to 8.15.0, bundling with Webpack results in the following error:
This previously occurred in version 8.11.0: #2975
And was fixed in this PR: #2978
The text was updated successfully, but these errors were encountered: