Avoid errors resolving dependencies in GHCJS output
This commit is contained in:
parent
0117777105
commit
099dccd2ed
10
src/index.js
10
src/index.js
@ -9,6 +9,16 @@ module.exports = (nextConfig = {}) => {
|
||||
|
||||
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({
|
||||
test: /\.(cabal)$/,
|
||||
use: [
|
||||
|
Loading…
Reference in New Issue
Block a user