From 1cd8b054869e568c95d75b0fbd2b024e47b7c0c3 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Mon, 11 Dec 2023 14:39:59 -0500 Subject: [PATCH] fix(react): webpack backwards compat for `@nx/react/plugin/webpack` (#20697) --- packages/react/plugins/webpack.ts | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/react/plugins/webpack.ts b/packages/react/plugins/webpack.ts index e9ae67c7e5..876bca5527 100644 --- a/packages/react/plugins/webpack.ts +++ b/packages/react/plugins/webpack.ts @@ -1,16 +1,6 @@ +import { composePlugins, withNx } from '@nx/webpack'; import { withReact } from './with-react'; -// Support existing default exports as well as new named export. -const legacyExport: any = withReact(); -legacyExport.withReact = withReact; +const plugin = composePlugins(withNx(), withReact()); -/** @deprecated use `import { withReact } from '@nx/react'` */ -// This is here for backward compatibility if anyone imports {getWebpackConfig} directly. -// TODO(jack): Remove in Nx 16 -const getWebpackConfig = withReact(); - -legacyExport.getWebpackConfig = getWebpackConfig; - -module.exports = legacyExport; - -export { getWebpackConfig }; +module.exports = plugin;