Skip to content

Commit

Permalink
fix(v2): fix LTR PostCSS bug on Netlify/monorepo symlinks (#4254)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Feb 19, 2021
1 parent a9b459b commit a58baac
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/docusaurus-theme-classic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,11 @@ export default function docusaurusThemeClassic(
if (direction === 'rtl') {
postCssOptions.plugins.push(
postcss.plugin('RtlCssPlugin', () => {
const resolvedInfimaFile = require.resolve(
getInfimaCSSFile(direction),
);
function isInfimaCSSFile(file) {
return (
file.endsWith(getInfimaCSSFile(direction)) ||
// special case for our own monorepo using symlinks!
file.endsWith(
'infima/packages/core/dist/css/default/default-rtl.css',
)
);
return file === resolvedInfimaFile;
}

return function (root: any) {
Expand Down

0 comments on commit a58baac

Please sign in to comment.