Open drwpow opened 1 month ago
Found a workaround:
// packages/react-color-picker/rollup.config.json
+ import { fileURLToPath } from 'node:url';
import ts from '@rollup/plugin-typescript';
/** @type {import("rollup").InputOptions} */
export default {
plugins: [
ts({
- tsconfig: './tsconfig.build.json',
+ tsconfig: fileURLToPath(new URL('./tsconfig.build.json', import.meta.url)),
}),
]
};
This just gives an absolute filepath to the plugin. Which may be an underlying issue with this Rollup plugin, and not Nx
Current Behavior
Given the following
rollup.config.js
in a monorepo (simplified):Trying to run
@nx/rollup/plugin
results in the following error:Basically it’s looking for
[projectRoot]/tsconfig.base.json
when it should be looking for/packages/react-color-picker/tsconfig.base.json
Expected Behavior
Rollup plugins resolve relative to
rollup.config.js
, rather than cwd or project rootGitHub Repo
https://github.com/terrazzoapp/terrazzo/pull/317/
Steps to Reproduce
nx
branchpnpm i
pnpm run build
(search for
rollup.config.js
files)Nx Report
Failure Logs
No response
Package Manager Version
pnpm 9.12.1
Operating System
Additional Information
Running
nx reset
didn’t fix the issue (it seems to be a problem with the Rollup plugin)