Skip to content

Get error with TypeError: userDefinedConfig is not a function when using with @nx/rspack #29514

@AdrianDuan

Description

@AdrianDuan

Current Behavior

When create and build with a custom rspack monorepo, @nx/rspack get error with TypeError: userDefinedConfig is not a function

Expected Behavior

@nx/rspack should read rspack config as expected

GitHub Repo

No response

Steps to Reproduce

  1. create an empty sub-app
  2. add rspack.config.cjs
  3. add @nx/rspack and custom build config

Nx Report

NX   Report complete - copy this into the issue template

Node           : 22.12.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.15.2

nx (global)        : 20.3.0
nx                 : 20.3.0
@nx/js             : 20.3.0
@nx/jest           : 20.3.0
@nx/eslint         : 20.3.0
@nx/cypress        : 20.3.0
@nx/devkit         : 20.3.0
@nx/eslint-plugin  : 20.3.0
@nx/next           : 20.3.0
@nx/plugin         : 20.3.0
@nx/react          : 20.3.0
@nx/rollup         : 20.3.0
@nx/rspack         : 20.3.0
@nx/storybook      : 20.3.0
nx-cloud           : 19.1.0
typescript         : 5.6.3
---------------------------------------
Community plugins:
@nrwl/cypress : 19.8.4
nx-electron   : 20.0.0
nx-stylelint  : 17.1.6

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions