1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-17 09:59:41 +00:00

fix(nx): use relative paths in tsconfig.base.json for TypeScript 7 compatibility (#18295)

Update the NX library generator to prefix paths with './' when adding entries to tsconfig.base.json. This ensures compatibility with TypeScript 7 and tsgo, which require relative paths to explicitly start with './'.
This commit is contained in:
Addison Beck
2026-01-09 15:22:54 -05:00
committed by GitHub
parent 881afacded
commit eb12758c99
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ describe("basic-lib generator", () => {
expect(tsconfigContent).not.toBeNull();
const tsconfig = JSON.parse(tsconfigContent?.toString() ?? "");
expect(tsconfig.compilerOptions.paths[`@bitwarden/${options.name}`]).toEqual([
`libs/test/src/index.ts`,
`./libs/test/src/index.ts`,
]);
});

View File

@@ -82,7 +82,7 @@ function updateTsConfigPath(tree: Tree, name: string, srcRoot: string) {
updateJson(tree, "tsconfig.base.json", (json) => {
const paths = json.compilerOptions.paths || {};
paths[`@bitwarden/${name}`] = [`${srcRoot}/index.ts`];
paths[`@bitwarden/${name}`] = [`./${srcRoot}/index.ts`];
json.compilerOptions.paths = paths;
return json;