Current Behavior
After 22.4.0 and converting postcss rollup plugin into internal Nx plugin (there #34110), it is not possible to build publishable library. Error is about CSS and SCSS processing. I explored Nx rollup withNx method in rollup.config.cjs and postcss plugin is specified there. Linked repo uses latest Nx 22.7.5.
Expected Behavior
Publishable library build should work the same as before 22.4.0 postcss plugin changes.
GitHub Repo
https://github.com/MiroslavKral/nx-react-2275
Steps to Reproduce
- Checkout repo
- Install dependencies with npm
- Build library with npx nx run @test/ui:build
Nx Report
Node : 22.21.1
OS : darwin-arm64
Native Target : aarch64-macos
npm : 10.9.4
daemon : Available
nx : 22.7.5
@nx/js : 22.7.5
@nx/eslint : 22.7.5
@nx/workspace : 22.7.5
@nx/jest : 22.7.5
@nx/cypress : 22.7.5
@nx/devkit : 22.7.5
@nx/eslint-plugin : 22.7.5
@nx/module-federation : 22.7.5
@nx/react : 22.7.5
@nx/rollup : 22.7.5
@nx/vite : 22.7.5
@nx/vitest : 22.7.5
@nx/web : 22.7.5
@nx/webpack : 22.7.5
typescript : 5.9.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/webpack/plugin
@nx/eslint/plugin
@nx/cypress/plugin
@nx/jest/plugin
@nx/rollup/plugin
---------------------------------------
Cache Usage: 0.00 B / 46.04 GB
Failure Logs
Executing task: npx nx run @test/ui:build
> nx run @test/ui:build
> rollup -c rollup.config.cjs
/Users/miroslav/Development/nx-react-2275/libs/test-lib/src/index.ts → dist...
[!] RollupError: src/lib/test-lib.module.scss (1:0): Expression expected (Note that you need plugins to import files that are not JavaScript)
src/lib/test-lib.module.scss (1:0)
1: .container {
^
2: display: flex;
3: flex-direction: column;
at Object.getRollupError (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/parseAst.js:289:41)
at ParseError.initialise (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:16419:40)
at convertNode (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:18395:10)
at convertProgram (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:17631:12)
at Module.setSource (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:19367:24)
at ModuleLoader.addModuleSource (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:23127:13)
[cause] RollupError: Expression expected
at Object.getRollupError (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/parseAst.js:289:41)
at ParseError.initialise (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:16419:40)
at convertNode (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:18395:10)
at convertProgram (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:17631:12)
at Module.setSource (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:19367:24)
at ModuleLoader.addModuleSource (/Users/miroslav/Development/nx-react-2275/node_modules/rollup/dist/shared/rollup.js:23127:13)
Package Manager Version
No response
Operating System
Additional Information
No response
Current Behavior
After 22.4.0 and converting postcss rollup plugin into internal Nx plugin (there #34110), it is not possible to build publishable library. Error is about CSS and SCSS processing. I explored Nx rollup withNx method in rollup.config.cjs and postcss plugin is specified there. Linked repo uses latest Nx 22.7.5.
Expected Behavior
Publishable library build should work the same as before 22.4.0 postcss plugin changes.
GitHub Repo
https://github.com/MiroslavKral/nx-react-2275
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response