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:
@@ -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`,
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user