Skip to content

Commit

Permalink
fix(typescript): fix path validation issue in validatePaths function
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCraig committed Oct 23, 2024
1 parent 95aa8cb commit 65ab028
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/typescript/src/options/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export function validatePaths(
`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`
);
}
} else if(dirProperty === 'outDir') {
const fromTsDirToRollup = relative(compilerOptions[dirProperty],outputDir);
if (fromTsDirToRollup.startsWith('..')) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside the same directory as the Rollup 'file' option.`);
}
} else {
const fromTsDirToRollup = relative(outputDir, compilerOptions[dirProperty]!);
if (fromTsDirToRollup.startsWith('..')) {
Expand Down

0 comments on commit 65ab028

Please sign in to comment.