Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(webpack): add convertConfigToWebpackPlugin #26516

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Jun 11, 2024

This PR introduces functionality for users who currently use the withNx and withReact plugins in their webpack configuration to migrate to the NxAppWebpackPlugin.

The nxUseLegacyPlugin wraps the legacy style function so that it continues to work with the standardized generated webpack config.

By implementing this change, the aim is to provide a consistent method for users opting to transition to inferred targets. This ensures a smoother migration process, offering better integration and reducing potential configuration complexities.

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jun 18, 2024 6:15pm

@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch 2 times, most recently from 20b3bd3 to bd2e85c Compare June 12, 2024 17:10
@@ -76,7 +76,7 @@ export function normalizeOptions(

const sourceRoot = projectNode.data.sourceRoot ?? projectNode.data.root;

if (!options.main) {
if (!combinedPluginAndMaybeExecutorOptions.main) {
Copy link
Contributor Author

@ndcunningham ndcunningham Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be checking the combined options (executor and config) and not only what has been set inside the config.

@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch from bd2e85c to 941d0f2 Compare June 12, 2024 17:52
@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch from 941d0f2 to ae5cad4 Compare June 12, 2024 18:07
@ndcunningham ndcunningham marked this pull request as ready for review June 12, 2024 18:25
@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch from ae5cad4 to 6b37da6 Compare June 12, 2024 18:26
@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch 2 times, most recently from 7c38035 to 487912b Compare June 12, 2024 19:17
@ndcunningham ndcunningham self-assigned this Jun 13, 2024
@ndcunningham ndcunningham added the scope: bundlers Issues related to webpack, rollup label Jun 13, 2024
@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch from 487912b to 371a13d Compare June 13, 2024 21:44
@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch from 371a13d to de7a524 Compare June 13, 2024 21:55
@ndcunningham ndcunningham force-pushed the feat/webpack-migrate-to-webpack-app-plugin branch from de7a524 to f15f356 Compare June 14, 2024 15:34
@jaysoo jaysoo merged commit b1dbf47 into master Jun 21, 2024
6 checks passed
@jaysoo jaysoo deleted the feat/webpack-migrate-to-webpack-app-plugin branch June 21, 2024 12:55
Copy link

github-actions bot commented Jul 1, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: bundlers Issues related to webpack, rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants