Avoid errors resolving dependencies in GHCJS output

This commit is contained in:
Ryan Trinkle 2023-07-03 16:02:30 -04:00
parent 0117777105
commit 099dccd2ed

View File

@ -9,6 +9,16 @@ module.exports = (nextConfig = {}) => {
const { dir, dev, isServer } = options; const { dir, dev, isServer } = options;
//TODO: We need this because all.js includes conditional `require`
//commands for these modules; even though it does not use them in
//practice, webpack wants to find them statically. Instead, we should
//deal with this in haskell-loader, e.g. by asking GHCJS not to produce
//these `require` invocations.
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
child_process: false
};
config.module.rules.push({ config.module.rules.push({
test: /\.(cabal)$/, test: /\.(cabal)$/,
use: [ use: [