Plugins fail on Windows
qinyouzhi opened this issue · comments
Inconsistent path addresses between Mac and Windows (Mac:/ Windows: ), resulting in plugin failure on Windows
Inconsistent path addresses between Mac and Windows (Mac:/ Windows: \), resulting in plugin failure on Windows
I don't have a windows machine to test out, and the issue description is vague. Can you further elaborate the issue you're seeing?
In @whyframe/jsx/src/docusaurus.cjs, the matching rule for rule @docusaurus/mdx-loader in Windows is actually @Docusaurus\mdx-loader, which causes the loader to fail to mount
There is also an issue with the 'this. resource' in loader.cjs. Change it to path.relative(__dirname, this.resource).split(path.sep).join('/') and run it
Sorry for the late reply, thanks for digging into this!
- The changes for
@docusaurus/mdx-loader
sounds good to me. - For
this.resource
, maybe it's better to usethis.resourcePath
instead? Would be great if you can test if this works.
Feel free to send a PR for the two changes too. Don't think we need tests for those for now, I should update CI to also run them in Windows.