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(edge): externalize node builtins #317

Merged
merged 3 commits into from
May 13, 2024
Merged

fix(edge): externalize node builtins #317

merged 3 commits into from
May 13, 2024

Conversation

ascorbic
Copy link
Contributor

Description

Currently the edge vite plugin sets noExternal to true, so that npm modules are bundled. However if a user tries to use Node builtins when targeting edge runtime, builds will fail because Vite attempts to bundle these, which is not allowed. This PR updates the Edge Vite plugin to externalize node builtins, and ensure the imports are always prefixed with node: this ensures that Deno will be able to polyfill them.

It also fixes the commitlint config, which was broken in a recent update

Related Tickets & Documents

  • Related Issue #
  • Closes #

QA Instructions, Screenshots, Recordings

Please replace this line with instructions on how to test your changes

For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This
    ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a
    typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style
    guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@ascorbic ascorbic requested a review from a team as a code owner May 12, 2024 11:16
Copy link

netlify bot commented May 12, 2024

Deploy Preview for remix-edge ready!

Name Link
🔨 Latest commit 8115be7
🔍 Latest deploy log https://app.netlify.com/sites/remix-edge/deploys/6641cd5544698f00081dfb83
😎 Deploy Preview https://deploy-preview-317--remix-edge.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.

Copy link

netlify bot commented May 12, 2024

Deploy Preview for remix-serverless ready!

Name Link
🔨 Latest commit 8115be7
🔍 Latest deploy log https://app.netlify.com/sites/remix-serverless/deploys/6641cd55128a4c000802e02e
😎 Deploy Preview https://deploy-preview-317--remix-serverless.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.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label May 12, 2024
@ascorbic ascorbic added the automerge so Kodiak can automatically merge label May 13, 2024
@kodiakhq kodiakhq bot merged commit 521bfee into main May 13, 2024
14 checks passed
@kodiakhq kodiakhq bot deleted the node-external branch May 13, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge so Kodiak can automatically merge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants