-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Gozala/fix/make-esm-mjs
fix: make esm mjs
- Loading branch information
Showing
7 changed files
with
27 additions
and
28 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 was deleted.
Oops, something went wrong.
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,7 +1,7 @@ | ||
// In node `export { TextEncoder }` throws: | ||
// "Export 'TextEncoder' is not defined in module" | ||
// To workaround we first define constants and then export with as. | ||
const Encoder = TextEncoder | ||
const Decoder = TextDecoder | ||
"use strict" | ||
|
||
export { Encoder as TextEncoder, Decoder as TextDecoder } | ||
exports.TextEncoder = | ||
typeof TextEncoder !== "undefined" ? TextEncoder : require("util").TextEncoder | ||
|
||
exports.TextDecoder = | ||
typeof TextDecoder !== "undefined" ? TextDecoder : require("util").TextDecoder |
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,7 @@ | ||
// In node `export { TextEncoder }` throws: | ||
// "Export 'TextEncoder' is not defined in module" | ||
// To workaround we first define constants and then export with as. | ||
const Encoder = TextEncoder | ||
const Decoder = TextDecoder | ||
|
||
export { Encoder as TextEncoder, Decoder as TextDecoder } |
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