Skip to content

Commit 5c04cea

Browse files
authored
fix: starting ~ in style paths (#8694)
1 parent 11124f9 commit 5c04cea

File tree

1 file changed

+7
-1
lines changed
  • packages/app/src/sandbox/eval/transpilers/postcss

1 file changed

+7
-1
lines changed

packages/app/src/sandbox/eval/transpilers/postcss/loader.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ export default async function (
4545
postcssImportPlugin({
4646
resolve: async (id: string, root: string) => {
4747
try {
48-
const result = await resolveCSSFile(loaderContext, id, root);
48+
// Angular specific, remove the ~ from the path to determine if it's a dependency
49+
const sanitizedPath = id.replace(/^~/, '');
50+
const result = await resolveCSSFile(
51+
loaderContext,
52+
sanitizedPath,
53+
root
54+
);
4955

5056
return result.module.path;
5157
} catch (e) {

0 commit comments

Comments
 (0)