Skip to content

Commit

Permalink
feat: polyfill atob, btoa, EventTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Aug 2, 2024
1 parent 95a2a06 commit b4d6442
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ module.exports = class GopeedPolyfillPlugin {
process: require.resolve('process/browser'),
TextEncoder: [require.resolve('text-encoding-utf-8'), 'TextEncoder'],
TextDecoder: [require.resolve('text-encoding-utf-8'), 'TextDecoder'],
EventTarget: [require.resolve('event-target-shim'), 'EventTarget'],
atob:[require.resolve('base-64'), 'decode'],

Check failure on line 64 in index.js

View workflow job for this annotation

GitHub Actions / Node.js 20

Missing space before value for key 'atob'.

Check failure on line 64 in index.js

View workflow job for this annotation

GitHub Actions / Node.js 18

Missing space before value for key 'atob'.

Check failure on line 64 in index.js

View workflow job for this annotation

GitHub Actions / Node.js 16

Missing space before value for key 'atob'.
btoa:[require.resolve('base-64'), 'encode'],

Check failure on line 65 in index.js

View workflow job for this annotation

GitHub Actions / Node.js 20

Missing space before value for key 'btoa'.

Check failure on line 65 in index.js

View workflow job for this annotation

GitHub Actions / Node.js 18

Missing space before value for key 'btoa'.

Check failure on line 65 in index.js

View workflow job for this annotation

GitHub Actions / Node.js 16

Missing space before value for key 'btoa'.
})),
);

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gopeed-polyfill-webpack-plugin",
"version": "1.0.3",
"version": "1.0.4",
"description": "Polyfill Node.js core modules in Webpack.",
"repository": "GopeedLab/gopeed-polyfill-webpack-plugin",
"author": {
Expand Down Expand Up @@ -28,13 +28,15 @@
],
"dependencies": {
"assert": "^2.1.0",
"base-64": "^1.0.0",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"builtin-status-codes": "^3.0.0",
"console-browserify": "^1.2.0",
"constants-browserify": "^1.0.0",
"crypto-browserify": "^3.12.0",
"domain-browser": "^4.22.0",
"event-target-shim": "^6.0.2",
"events": "^3.3.0",
"https-browserify": "^1.0.0",
"inherits": "^2.0.4",
Expand Down

0 comments on commit b4d6442

Please sign in to comment.