I attempted to incorporate the below webpack configuration but unfortunately, it does not seem to be functioning as expected:
import webpack from 'webpack';
module.exports = {
webpack: (config, options) => {
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /^pg-native$|^cloudflare:sockets$/,
}),
);
return config;
},
};
My current setup involves Nest.js v9.4.2, and I am aiming to integrate pg v8.6.0 library into my project. However, upon adding it to the package.json
, an error message is generated:
Info Webpack is building your sources...
ERROR in cloudflare:sockets
Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "cloudflare:" URIs.