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

refactor: always load config with esbuild bundled code #9121

Merged
merged 1 commit into from Jul 14, 2022

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Jul 14, 2022

Description

Fix #9109

ESM config files can be loaded by node directly, but this has the caveat of not being able to use __filename, __dirname which we document do support. Since we're already always bundling the config (to track dependencies), this PR uses the bundled code when loading them in ESM too.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy bluwy added the p2-nice-to-have 🍰 Not breaking anything but nice to have (priority) label Jul 14, 2022
@netlify
Copy link

netlify bot commented Jul 14, 2022

Deploy Preview for vite-docs-main ready!

Name Link
🔨 Latest commit bae13a8
🔍 Latest deploy log https://app.netlify.com/sites/vite-docs-main/deploys/62d0364c65bb7d0008d3ec52
😎 Deploy Preview https://deploy-preview-9121--vite-docs-main.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 settings.

Copy link
Member

@sapphi-red sapphi-red left a comment

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have 🍰 Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✘ [ERROR] The symbol "__dirname" has already been declared
3 participants