`process.env` undefined in service-worker.js using Spartacus + Webpack after updating from 2.x to 3.x

Updated Layer0 from 2.x (xdn) to 3.x (layer0) and am getting these process.env undefined errors on the service worker all of a sudden

The issue here was just that for our serviceworker webpack.config under /sw/webpack.config.js had the following env configs:

    new webpack.EnvironmentPlugin({
      XDN_PREFETCH_CACHE_NAME: 'prefetch',
      XDN_PREFETCH_HEADER_VALUE: '1',
      NODE_ENV: 'production'
    })

Which needed to be updated to:

    new webpack.EnvironmentPlugin({
      LAYER0_PREFETCH_CACHE_NAME: 'prefetch',
      LAYER0_PREFETCH_HEADER_VALUE: '1',
      NODE_ENV: 'production'
    })

And the SW now runs properly.