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(node-stuff): use more conventional shim method #7587

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Aug 15, 2024

Summary

In previous implementation, when there's a . in the path, the __webpack_fileURLToPath__(temp + '/..').slice(0, -1) will change like this:

file:///Users/abc/.pnpm/index.js

-- after __webpack_fileURLToPath__(temp + '/..') -->

/Users/abc/.pnpm/index.js/..

-- after slice(0, -1) -->

/Users/abc/.pnpm/index.js/.

Use the commonly used and battle tested way, also used by tsup https://github.com/egoist/tsup/blob/49c11c3073ce977a01c84e7848fc070d5de0a652/assets/esm_shims.js.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Aug 15, 2024
Copy link

netlify bot commented Aug 15, 2024

Deploy Preview for rspack ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f130c1c
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66bde020b08117000951d034
😎 Deploy Preview https://deploy-preview-7587--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Timeless0911
Copy link
Collaborator

I need a canary version now.

@fi3ework fi3ework enabled auto-merge (squash) August 15, 2024 11:19
@fi3ework fi3ework merged commit 378b75e into web-infra-dev:main Aug 15, 2024
35 checks passed
@fi3ework fi3ework deleted the better-shim branch August 15, 2024 11:32
@chenjiahan chenjiahan mentioned this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants