Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins fail on Windows #27

Open
qinyouzhi opened this issue Aug 30, 2023 · 5 comments
Open

Plugins fail on Windows #27

qinyouzhi opened this issue Aug 30, 2023 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@qinyouzhi
Copy link

Inconsistent path addresses between Mac and Windows (Mac:/ Windows: ), resulting in plugin failure on Windows

@qinyouzhi
Copy link
Author

Inconsistent path addresses between Mac and Windows (Mac:/ Windows: \), resulting in plugin failure on Windows

@bluwy
Copy link
Owner

bluwy commented Sep 1, 2023

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?

@qinyouzhi
Copy link
Author

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

@qinyouzhi
Copy link
Author

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

@bluwy
Copy link
Owner

bluwy commented Sep 4, 2023

Sorry for the late reply, thanks for digging into this!

  1. The changes for @docusaurus/mdx-loader sounds good to me.
  2. For this.resource, maybe it's better to use this.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.

@bluwy bluwy added bug Something isn't working good first issue Good for newcomers labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants