2022-08-02 22:53:24 +03:00
|
|
|
module.exports = {
|
2022-06-22 23:54:19 +03:00
|
|
|
reactStrictMode: false,
|
|
|
|
// target: 'serverless',
|
|
|
|
webpack: (config, { isServer }) => {
|
|
|
|
// Fixes npm packages that depend on `fs` module
|
|
|
|
if (!isServer) {
|
|
|
|
config.resolve.fallback = {
|
|
|
|
fs: false,
|
|
|
|
path: "path-browserify",
|
|
|
|
events: false,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if (isServer) {
|
|
|
|
config.externals.push("_http_common");
|
|
|
|
}
|
|
|
|
config.resolve.alias.stream = "stream-browserify";
|
|
|
|
config.resolve.alias.zlib = "browserify-zlib";
|
|
|
|
// config.externals = {
|
|
|
|
// ...config.externals,
|
|
|
|
// canvas: "util",
|
|
|
|
// bufferutil: "bufferutil",
|
|
|
|
// "utf-8-validate": "utf-8-validate"
|
|
|
|
// }
|
|
|
|
return config;
|
|
|
|
},
|
2022-08-02 22:53:24 +03:00
|
|
|
};
|