-
-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support require without .default and import from mjs, closes #1381
- Loading branch information
1 parent
0fc85a3
commit b0c5399
Showing
15 changed files
with
128 additions
and
117 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import type Ajv from "../dist/core" | ||
|
||
const m = typeof window == "object" ? (window as any).ajv7 : require("" + "..") | ||
const AjvClass: typeof Ajv = m.default | ||
const AjvClass: typeof Ajv = typeof window == "object" ? (window as any).ajv7 : require("" + "..") | ||
|
||
export default AjvClass | ||
module.exports = AjvClass | ||
module.exports.default = AjvClass |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type Ajv2019 from "../dist/2019" | ||
|
||
const m = typeof window == "object" ? (window as any).ajv2019 : require("" + "../dist/2019") | ||
const AjvClass: typeof Ajv2019 = m.default | ||
const AjvClass: typeof Ajv2019 = | ||
typeof window == "object" ? (window as any).ajv2019 : require("" + "../dist/2019") | ||
|
||
export default AjvClass | ||
module.exports = AjvClass | ||
module.exports.default = AjvClass |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type AjvJTD from "../dist/jtd" | ||
|
||
const m = typeof window == "object" ? (window as any).ajvJTD : require("" + "../dist/jtd") | ||
const AjvClass: typeof AjvJTD = m.default | ||
const AjvClass: typeof AjvJTD = | ||
typeof window == "object" ? (window as any).ajvJTD : require("" + "../dist/jtd") | ||
|
||
export default AjvClass | ||
module.exports = AjvClass | ||
module.exports.default = AjvClass |
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