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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reinstate ESM transpilation for NFT (#790)
* feat: reinstate ESM transpilation for NFT * chore: add check for Node version * chore: add comment * chore: doh * chore: simplify Node version check Co-authored-by: Netlify Team Account 1 <90322326+netlify-team-account-1@users.noreply.github.com> * refactor: simplify Map initialisation Co-authored-by: Netlify Team Account 1 <90322326+netlify-team-account-1@users.noreply.github.com> * refactor: fix `shouldTranspile` * refactor: make `shouldTranspile` read from cache * refactor: use non-null assertion operator Co-authored-by: Netlify Team Account 1 <90322326+netlify-team-account-1@users.noreply.github.com> * refactor: remove non-null assertion operator Co-authored-by: Netlify Team Account 1 <90322326+netlify-team-account-1@users.noreply.github.com>
- Loading branch information
1 parent
8514efb
commit 6a9a9f8
Showing
7 changed files
with
148 additions
and
76 deletions.
There are no files selected for viewing
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
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
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
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
5 changes: 5 additions & 0 deletions
5
tests/fixtures/local-require-esm/function_cjs/function_cjs.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = async function getZero() { | ||
const esm = import('esm-module') | ||
|
||
return esm && 0 | ||
} |
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
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
6a9a9f8
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.
⏱ Benchmark results
largeDepsNft: 1m 8.3s
largeDepsZisi: 1m 23.8s