developers.urbit.org/next.config.js

27 lines
684 B
JavaScript
Raw Normal View History

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;
},
};