Skip to content

Commit db22cde

Browse files
committed
docs: Hackily fix codesandbox.io not using sass resolutions in package.json
Closes #1261
1 parent 4dba778 commit db22cde

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/documentation/src/utils/getSandbox.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ export default function getSandbox(
7777
"$rmd-theme-light: false"
7878
);
7979
}
80+
81+
if (fileName.endsWith(".scss")) {
82+
content = content.replace(
83+
/^@(use|forward) ('|")react-md\2(.*)$/gm,
84+
"// Note: Outside of codesandbox, this can be `@$1 $2react-md$2$3`\n@$1 $2react-md/dist/everything$2$3"
85+
);
86+
}
8087
} else if (
8188
typeof content === "object" &&
8289
content &&

0 commit comments

Comments
 (0)