Skip to content

Commit

Permalink
docs: Hackily fix codesandbox.io not using sass resolutions in packag…
Browse files Browse the repository at this point in the history
…e.json

Closes #1261
  • Loading branch information
mlaursen committed Oct 11, 2021
1 parent 4dba778 commit db22cde
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/documentation/src/utils/getSandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ export default function getSandbox(
"$rmd-theme-light: false"
);
}

if (fileName.endsWith(".scss")) {
content = content.replace(
/^@(use|forward) ('|")react-md\2(.*)$/gm,
"// Note: Outside of codesandbox, this can be `@$1 $2react-md$2$3`\n@$1 $2react-md/dist/everything$2$3"
);
}
} else if (
typeof content === "object" &&
content &&
Expand Down

1 comment on commit db22cde

@vercel
Copy link

@vercel vercel bot commented on db22cde Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.