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

adapter-netlify: Use CJS entrypoint to load ESM files #485

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

GrygrFlzr
Copy link
Member

  • Rename ESM files to .mjs
  • Add CJS index.js entry point for lambda

@Rich-Harris
Copy link
Member

I feel a bit conflicted about this — it feels rather hacky. I almost wonder if adapters should be responsible for bundling the outputted ESM (this would also solve the question of what needs to be considered external during build, so that adapters that target lambda can create a single CJS file.

Alternatively maybe Vite could output both ESM and CJS from build.

I don't think it should hold us up though, I'll merge this and #483 and raise an issue for that

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.

2 participants