developers.urbit.org/next.config.js
2022-08-02 12:53:24 -07:00

27 lines
684 B
JavaScript

module.exports = {
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;
},
};