This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
fix: do not transpile ESM for v2 functions #1418
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
β± Benchmark resultsComparing with b5d9751 largeDepsEsbuild: 2.1sβ¬οΈ 3.08% decrease vs. b5d9751
Legend
largeDepsNft: 7.5sβ¬οΈ 2.64% decrease vs. b5d9751
Legend
largeDepsZisi: 14.9sβ¬οΈ 0.25% decrease vs. b5d9751
Legend
|
danez
commented
May 8, 2023
@@ -26,7 +26,7 @@ const getEntryFileContents = (mainPath: string, moduleFormat: string, featureFla | |||
|
|||
if (featureFlags.zisi_functions_api_v2) { | |||
return [ | |||
`import func from '${importPath}'`, | |||
`import * as func from '${importPath}'`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getLambdaHandler
expects an object with a default
property. Previously this seemed to work, because we were still transpilling the code
https://ntl.fyi/esm created. |
eduardoboucas
approved these changes
May 8, 2023
Skn0tt
pushed a commit
to netlify/build
that referenced
this pull request
May 21, 2024
β¦t#1418) * fix: do not transpile ESM for v2 functions * fix: import user code correctly * chore: disable complexity rule * chore: update error
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Refs https://github.com/netlify/pod-compute/issues/475
For us to review and ship your PR efficiently, please perform the following steps:
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.
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)