Skip to content

Upgrading from 20.4.6 to 20.5.0 broke stylePreprocessorOptions.includePaths in a webpack react project #30340

Closed
@jihoun

Description

@jihoun

Current Behavior

Hi,

I have a workspace with multiple react apps and libraries. The apps are webpack projects. I have my reusable scss scripts in a grouped folder libs/style/src/scss. So, I am using the following configuration in the project.json

 "stylePreprocessorOptions": {
  "includePaths": ["libs/style/src/scss"]
}

After upgrading to 20.5.0, I get the following errors:

Error: Module build failed (from ../../../node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
  ╷
1 │ @import 'default';

Expected Behavior

Upgrading from 20.4.6 to 20.5.0 should not break this.

GitHub Repo

Issue-30340

Steps to Reproduce

  1. Have a webpack react app
  2. Have a separate style folder
  3. Link to the style folder using stylePreprocessorOptions.includePaths configuration
  4. Try to build with 20.5.0

Nx Report

NX   Report complete - copy this into the issue template

Node           : 22.2.0
OS             : darwin-arm64
Native Target  : aarch64-macos
yarn           : 3.6.3

nx                     : 20.5.0
@nx/js                 : 20.5.0
@nx/jest               : 20.5.0
@nx/eslint             : 20.5.0
@nx/workspace          : 20.5.0
@nx/cypress            : 20.5.0
@nx/devkit             : 20.5.0
@nx/eslint-plugin      : 20.5.0
@nx/module-federation  : 20.5.0
@nx/nest               : 20.5.0
@nx/node               : 20.5.0
@nx/react              : 20.5.0
@nx/storybook          : 20.5.0
@nx/web                : 20.5.0
@nx/webpack            : 20.5.0
typescript             : 5.8.2

---------------------------------------
Nx Powerpack
Licensed to xxx for 1 user in an unlimited number of workspaces.
License expires on xxx.


---------------------------------------
Registered Plugins:
@nx/cypress/plugin
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

Package Manager Version

Yarn 3.6.3

Operating System

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

Additional Information

I suppose it is related to #29999

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions