nx/packages/webpack/index.ts
Jack Hsu 147d0e1345
chore(js): bump some v21 removal to v22 (#30911)
This PR bumps two v21 removals to v22:
1. SWC inline feature -- some people still use it even though it's
experimental. We should rethink how to remove this.
2. Cypress component testing not relying on `@nx/webpack:webpack`
executor -- we need a separate `webpack.cy.config.js` that only
configures the plugins needed Cypress CT.

This PR also keeps the Webpack plugin exports of `@nx/react` and
`@nx/webpack` packages. The `convert-to-inferred` and app generators
have been using the `@nx/react/webpack-plugin` and
`@nx/webpack/app-plugin` already for a while, there's no harm to keep
the exports in the index for older projects if they haven't been
updated.
2025-04-29 09:58:06 -04:00

39 lines
1.9 KiB
TypeScript

import { configurationGenerator } from './src/generators/configuration/configuration';
import { NxAppWebpackPlugin } from './src/plugins/nx-webpack-plugin/nx-app-webpack-plugin';
import { NxTsconfigPathsWebpackPlugin as _NxTsconfigPathsWebpackPlugin } from './src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin';
import { convertConfigToWebpackPluginGenerator } from './src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin';
import { useLegacyNxPlugin } from './src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin';
export {
configurationGenerator,
convertConfigToWebpackPluginGenerator,
useLegacyNxPlugin,
};
// Exported for backwards compatibility in case a plugin is using the old name.
/** @deprecated Use `configurationGenerator` instead. */
export const webpackProjectGenerator = configurationGenerator;
/** @deprecated Use NxAppWebpackPlugin from `@nx/webpack/app-plugin` instead, which can improve graph creation by 150-200ms per file. */
export const NxWebpackPlugin = NxAppWebpackPlugin;
/** @deprecated Use NxTsconfigPathsWebpackPlugin from `@nx/webpack/tsconfig-paths-plugin` instead. */
export const NxTsconfigPathsWebpackPlugin = _NxTsconfigPathsWebpackPlugin;
export * from './src/utils/create-copy-plugin';
export * from './src/utils/config';
export { webpackInitGenerator } from './src/generators/init/init';
export type { WebDevServerOptions } from './src/executors/dev-server/schema';
export * from './src/executors/dev-server/dev-server.impl';
export * from './src/executors/webpack/lib/normalize-options';
export type {
WebpackExecutorOptions,
NormalizedWebpackExecutorOptions,
AssetGlobPattern,
FileReplacement,
} from './src/executors/webpack/schema';
export * from './src/executors/webpack/webpack.impl';
export * from './src/utils/get-css-module-local-ident';
export * from './src/utils/with-nx';
export * from './src/utils/with-web';
export * from './src/utils/e2e-web-server-info-utils';