-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add register.js for use with --import flag (#4110)
* Add /register export for use with --import flag * Add !register.js to .npmignore * Fix register.js lint * Add missing exports to package.json * Test startup for each loader/import scenario * Remove exports entry from package.json to avoid breaking change * Remove extensionless argv case from startup.spec.js * Add version checks to startup.spec.js * Use v20.6 instead of v20 * Improve version checks in startup.spec.js --------- Co-authored-by: Sam Martin <[email protected]> Co-authored-by: Sam Martin <[email protected]>
- Loading branch information
1 parent
04f1370
commit eb34abe
Showing
4 changed files
with
163 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
!esbuild.js | ||
!init.js | ||
!loader-hook.mjs | ||
!register.js | ||
!package.json | ||
!cypress/**/* | ||
!ci/**/* | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const { register } = require('node:module') | ||
const { pathToFileURL } = require('node:url') | ||
|
||
register('./loader-hook.mjs', pathToFileURL(__filename)) |