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 rsapck plugin with stylus is not working #29910

Closed
4 tasks
tamascsaba opened this issue Feb 6, 2025 · 1 comment
Closed
4 tasks

Nx rsapck plugin with stylus is not working #29910

tamascsaba opened this issue Feb 6, 2025 · 1 comment

Comments

@tamascsaba
Copy link

tamascsaba commented Feb 6, 2025

Current Behavior

I want to use Rspack with Stylus in my project, but I ran into an error during the process. After diving into the Nx source code, I found the root cause of the issue. The problem arises from a specific line in the apply-web-config.ts file, which is part of the Rspack plugin for Nx:

apply-web-config.ts#L303

The path '../../../utils/webpack/deprecated-stylus-loader.js' is incorrect, and it's causing the error.

Expected Behavior

Add deprecated-stylus-loader.js to nx rspack plugin.

GitHub Repo

No response

Steps to Reproduce

  1. nx g @nx/react:app my-app --bundler=rspack
  2. Create a stylus file for example app.styl
  3. import in the main.ts import './app.styl'

Nx Report

●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit                                            <i> [webpack-dev-middleware] wait until bundle finished: /

 ERROR  Compilation failed. See above for more details.

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

No response

@ndcunningham
Copy link
Contributor

Hey, thanks for filling out an issue.

The stylus support for webpack has been deprecated and will be removed shortly.
Moving forward rspack will not have support for stylus and it is encouraged that you migrate to Sass by remaining your .styl files to .scss or .sass ensuring that the content is valid Sass.

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

2 participants