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

fix(react): webpack backwards compat for @nx/react/plugin/webpack #20697

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Dec 11, 2023

Now that our Webpack executor supports standard Webpack configuration files, we need to check if the exported function is a standard Webpack function (env, args) -> config or Nx-specific funtion (config, nxContext) -> config. To be treated as an Nx-specific function, it needs to be called with composePlugins, otherwise @nx/webpack:webpack executor will pass the function to Webpack as a standard config.

This means that legacy setup with this in project.json...

build: {
  options: { 
    //...
    webpackConfig: '@nx/react/plugins/webpack'
  }
}

...will no longer build since @nx/react/plugin/webpack does not run through composePlugins.

Current Behavior

Build is broken

Expected Behavior

Build works

Related Issue(s)

Fixes #20669

Notes

Also removes getWebpackConfig function that we deprecated in Nx 14 and was supposed to remove in Nx 16.

@jaysoo jaysoo requested a review from a team as a code owner December 11, 2023 18:32
@jaysoo jaysoo requested a review from ndcunningham December 11, 2023 18:32
Copy link

vercel bot commented Dec 11, 2023

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Dec 11, 2023 6:33pm

@jaysoo jaysoo merged commit 1cd8b05 into nrwl:master Dec 11, 2023
6 checks passed
@jaysoo jaysoo deleted the issue/20669 branch December 11, 2023 19:41
Copy link

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 Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

17.2.0 @nx/webpack:webpack executor not compatible with @nx/react/plugins/webpack
2 participants