withServiceWorker webpack5 issue in Next.js

xdn init sets up next.config.js to have true below by default. With that setup, one gets the error you can see below. changing it to false fixes the issue. Please investigate.

module.exports = withXDN(
  withServiceWorker({
    future: {
      webpack5: false,
    },
  })
)

asdf

% xdn dev
> Starting MOOVWEB XDN in development mode with caching disabled...
> getting rewrites and redirects from next config
Next ready - started server on 0.0.0.0:3001, url: http://localhost:3001
Next Defining routes from exportPathMap
Next /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:55540
			dependency.getCondition(this)
			           ^

TypeError: dependency.getCondition is not a function
    at ModuleGraph.setResolvedModule (/Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:55540:15)
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:37141:19
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:119643:5
    at Hook.eval [as callAsync] (eval at create (/Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:27150:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:26952:14)
    at AsyncQueue._handleResult (/Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:119616:21)
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:119599:11
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:36826:4
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:31643:6
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:31597:11
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:68834:8
    at /Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:31646:6
    at eval (eval at create (/Users/ajay/Documents/code/the-pull-up/node_modules/next/dist/compiled/webpack/bundle5.js:27150:10), <anonymous>:30:1)
Next npmNext  ERR! code 1
Next npm ERR!Next  path /Users/ajay/Documents/code/the-pull-up
Next npm Next ERR! command failed
npm ERR! Next command sh -c next "dev" "-p" "3001"
Next 
Next npm ERR! A complete log of this run can be found in:
npm ERR!Next      /Users/ajay/.npm/_logs/2021-02-10T21_21_25_754Z-debug.log
The XDN encountered a fatal error while running your application. Exiting...

Have you tried upgrading to the latest XDN and Next.js versions? I can’t seem to reproduce it with a new Next.js app. To upgrade run:

$ npm i --save next@latest
$ xdn use latest

Be aware that Next.js support for Webpack 5 is still in beta and not stable and that’s the source of this issue. Once this is stable in Webpack 5 it should just work. In the meantime, we’ll explore possible workarounds to alleviate these issues when getting started. This is logged as XDN-8779.