fix(bundling): do not normalize tsconfig path for Windows with rollup (#30567)
## Current Behavior
Rollup build fails on Windows with errors like this:
```
[plugin rpt2] error TS6059: File '/foo/bar/baz.ts' is not under 'rootDir' 'C:/foo/bar'. 'rootDir' is expected to contain all source files.
```
This is because since
81fe7bb278
the `tsconfig` path passed to `rollup-plugin-typescript2` is built using
`joinPathFragments`, which removes the drive letter on Windows.
## Expected Behavior
Rollup build should not fail.
This commit is contained in:
parent
5f7d46354e
commit
659149d87c
@ -5,7 +5,6 @@ import * as rollup from 'rollup';
|
|||||||
import { getBabelInputPlugin } from '@rollup/plugin-babel';
|
import { getBabelInputPlugin } from '@rollup/plugin-babel';
|
||||||
import * as autoprefixer from 'autoprefixer';
|
import * as autoprefixer from 'autoprefixer';
|
||||||
import {
|
import {
|
||||||
joinPathFragments,
|
|
||||||
logger,
|
logger,
|
||||||
type ProjectGraph,
|
type ProjectGraph,
|
||||||
readCachedProjectGraph,
|
readCachedProjectGraph,
|
||||||
@ -83,7 +82,7 @@ export function withNx(
|
|||||||
|
|
||||||
const tsConfigPath =
|
const tsConfigPath =
|
||||||
options.buildLibsFromSource || global.NX_GRAPH_CREATION
|
options.buildLibsFromSource || global.NX_GRAPH_CREATION
|
||||||
? joinPathFragments(workspaceRoot, options.tsConfig)
|
? join(workspaceRoot, options.tsConfig)
|
||||||
: createTmpTsConfig(
|
: createTmpTsConfig(
|
||||||
options.tsConfig,
|
options.tsConfig,
|
||||||
workspaceRoot,
|
workspaceRoot,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user