Skip to content

Commit

Permalink
fix issue where windows paths broke mdx.macro. see frontarm#67
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemnmez committed Jul 28, 2020
1 parent bf1e887 commit 9440f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mdx.macro/mdx.macro.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function transform({ babel, filename, documentFilename }) {
// changes will be picked up and cause a re-build.
// Note: this relies on files with macros *not* being cached by babel.
if (process.env.NODE_ENV === "development") {
imports += `import '${documentPath}'\n`
imports += `import '${documentPath.replace(/\\/g, "\\\\")}' // ${documentPath}\n`
}

let source = fs.readFileSync(documentPath, 'utf8');
Expand Down

0 comments on commit 9440f7f

Please sign in to comment.