Replace node: {fs: 'empty'} with resolve.fallback

Proprietary

webpack 5 removes the automatic Node.js polyfills, so node: {fs: 'empty'} becomes resolve: {fallback: {fs: false}}. Applies to a node object in a webpack configuration whose every entry is 'empty' for a Node.js core module that has no browser polyfill, when the configuration has no resolve of its own. Anything else in node is left for FindWebpack5ManualMigrations.

org.openrewrite.nodejs.migrate.webpack.ReplaceWebpackNodeEmptyWithResolveFallback
mod run . --recipe=org.openrewrite.nodejs.migrate.webpack.ReplaceWebpackNodeEmptyWithResolveFallback

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.