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

@nx/rspack does not convert webpack to rspack in my NestJS apps #29482

Open
3 of 4 tasks
rujorgensen opened this issue Dec 28, 2024 · 0 comments
Open
3 of 4 tasks

@nx/rspack does not convert webpack to rspack in my NestJS apps #29482

rujorgensen opened this issue Dec 28, 2024 · 0 comments

Comments

@rujorgensen
Copy link

rujorgensen commented Dec 28, 2024

Current Behavior

Neither of the generators @nx/rspack:convert-config-to-rspack-plugin or @nx/rspack:convert-webpack converts the webpack configuration of a NestJS application to rspack.

Expected Behavior

I'd expect:

  1. A rspack.config.js configuration file to be generated inspired from the current webpack.config.js
  2. The build target of the converted application project to be updated to use the new rspack configuration
  3. The original webpack.config.js-file to be deleted

GitHub Repo

https://github.com/rujorgensen/nx-webpack-rspack-conf-issue

Steps to Reproduce

  1. Create a fresh workspace: npx create-nx-workspace nx-workspace --preset=nest --no-interactive
  2. Add @nx/rspack to the workspace: cd nx-workspace && nx add @nx/rspack
  3. Convert the webpack configuration to rspack:
    a. npx nx g @nx/rspack:convert-webpack --project=nx-workspace
    --OR--
    b. npx nx g @nx/rspack:convert-config-to-rspack-plugin --project=nx-workspace

Current result:
3.a. Completes without touching any files
3.b. Fails with "NX Could not find any projects to migrate."

Nx Report

nx (global)            : 20.0.0
nx                     : 20.3.0
@nx/js                 : 20.3.0
@nx/jest               : 20.3.0
@nx/eslint             : 20.3.0
@nx/workspace          : 20.3.0
@nx/devkit             : 20.3.0
@nx/eslint-plugin      : 20.3.0
@nx/module-federation  : 20.3.0
@nx/nest               : 20.3.0
@nx/node               : 20.3.0
@nx/rspack             : 20.3.0
@nx/web                : 20.3.0
@nx/webpack            : 20.3.0
typescript             : 5.6.3
---------------------------------------
Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
@nx/jest/plugin
@nx/rspack/plugin

Failure Logs

Package Manager Version

❯ npm -v 10.2.4

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Running on Windows in WSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant