fix(react): webpack backwards compat for @nx/react/plugin/webpack (#20697)
This commit is contained in:
parent
31a12c409b
commit
1cd8b05486
@ -1,16 +1,6 @@
|
|||||||
|
import { composePlugins, withNx } from '@nx/webpack';
|
||||||
import { withReact } from './with-react';
|
import { withReact } from './with-react';
|
||||||
|
|
||||||
// Support existing default exports as well as new named export.
|
const plugin = composePlugins(withNx(), withReact());
|
||||||
const legacyExport: any = withReact();
|
|
||||||
legacyExport.withReact = withReact;
|
|
||||||
|
|
||||||
/** @deprecated use `import { withReact } from '@nx/react'` */
|
module.exports = plugin;
|
||||||
// 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 };
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user