Skip to content

Fix no edge functions deployed to netlify#6793

Merged
bluwy merged 3 commits intowithastro:mainfrom
andremralves:fix/no-edge-functions-deployed-to-netlify
Apr 10, 2023
Merged

Fix no edge functions deployed to netlify#6793
bluwy merged 3 commits intowithastro:mainfrom
andremralves:fix/no-edge-functions-deployed-to-netlify

Conversation

@andremralves
Copy link
Contributor

@andremralves andremralves commented Apr 8, 2023

Changes

fixes #6506

  • This commit changes the generated edge function file from entry.mjs
    back to entry.js
  • Apparently Netlify doesn't identify edge functions when the file extension is .mjs
  • The issue started in version 2.1.3 when the file extension was changed.
  • The extension was changed because of this issue Vercel Serverless - astro build fails with "Cannot use import statement outside a module" #6299 that was affecting Vercel and maybe could affect Netlify.
  • But I tested version 2.1.2 of @astrojs/netlify using type: "commonjs" inside package.json and found no errors.

Testing

I just changed one test that was expecting .mjs.

Docs

n/a

@changeset-bot
Copy link

changeset-bot bot commented Apr 8, 2023

🦋 Changeset detected

Latest commit: 16bd365

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Apr 8, 2023
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Thanks for catching this! (And sorry for causing the regression)

@bluwy bluwy merged commit 1e3873c into withastro:main Apr 10, 2023
@astrobot-houston astrobot-houston mentioned this pull request Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy to Netlify SSR(edge): got Page Not Found and No edge functions deployed

2 participants