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

fix: can't build package on windows #1894

Merged
merged 2 commits into from May 23, 2023
Merged

Conversation

AkaraChen
Copy link
Contributor

@AkaraChen AkaraChen commented May 23, 2023

On windows, fast-glob return path use '/' as separator, but esbuild use '\', causing the esbuild plugin add-mjs can't identify client import, so the nextra package build output client script as .mjs:

image

@changeset-bot
Copy link

changeset-bot bot commented May 23, 2023

⚠️ No Changeset found

Latest commit: f6ebd07

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented May 23, 2023

@AkaraChen is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented May 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2023 9:17am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview May 23, 2023 9:17am

@@ -14,6 +14,8 @@ const CLIENT_ENTRY = [
const entries = fg.sync(CLIENT_ENTRY, { absolute: true })
const entriesSet = new Set(entries)

const winPath = (p: string) => p.replace(/\\/g, '/')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you use slash package for this case (he is already installed in nextra)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you use slash package for this case (he is already installed in nextra)

Edited

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

Thank you!

@dimaMachina dimaMachina merged commit d3017dd into shuding:main May 23, 2023
3 of 4 checks passed
filiphuhta pushed a commit to filiphuhta/nextra that referenced this pull request May 24, 2023
* fix: can't build package on windows

* chore: replace winPath with slash
tatukoivisto pushed a commit to tatukoivisto/nextra that referenced this pull request Aug 20, 2023
* fix: can't build package on windows

* chore: replace winPath with slash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants