Skip to content

Commit bca47eb

Browse files
committed
fixup! perf(@angular/build): share sass directory and resolution caches across stylesheets
1 parent 2119fd6 commit bca47eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/angular/build/src/tools/esbuild/stylesheets/sass-language.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ async function compileString(
146146

147147
// Caching package root locations is particularly beneficial for `@material/*` packages
148148
// which extensively use deep imports.
149+
const packageRootKey = `${options.containingUrl?.href ?? ''}:${packageName}`;
149150
const packageRoot = await currentPackageRootCache.getOrCreate(
150-
packageName,
151+
packageRootKey,
151152
async () => {
152153
// Use the required presence of a package root `package.json` file to resolve the location
153154
const packageResult = await resolveUrl(packageName + '/package.json', options);

0 commit comments

Comments
 (0)