Skip to content

Commit

Permalink
fix(react): webpack backwards compat for @nx/react/plugin/webpack (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Dec 11, 2023
1 parent 31a12c4 commit 1cd8b05
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions packages/react/plugins/webpack.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 1cd8b05

Please sign in to comment.