Skip to content

Commit b4d6442

Browse files
committed
feat: polyfill atob, btoa, EventTarget
1 parent 95a2a06 commit b4d6442

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ module.exports = class GopeedPolyfillPlugin {
6060
process: require.resolve('process/browser'),
6161
TextEncoder: [require.resolve('text-encoding-utf-8'), 'TextEncoder'],
6262
TextDecoder: [require.resolve('text-encoding-utf-8'), 'TextDecoder'],
63+
EventTarget: [require.resolve('event-target-shim'), 'EventTarget'],
64+
atob:[require.resolve('base-64'), 'decode'],
65+
btoa:[require.resolve('base-64'), 'encode'],
6366
})),
6467
);
6568

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gopeed-polyfill-webpack-plugin",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Polyfill Node.js core modules in Webpack.",
55
"repository": "GopeedLab/gopeed-polyfill-webpack-plugin",
66
"author": {
@@ -28,13 +28,15 @@
2828
],
2929
"dependencies": {
3030
"assert": "^2.1.0",
31+
"base-64": "^1.0.0",
3132
"browserify-zlib": "^0.2.0",
3233
"buffer": "^6.0.3",
3334
"builtin-status-codes": "^3.0.0",
3435
"console-browserify": "^1.2.0",
3536
"constants-browserify": "^1.0.0",
3637
"crypto-browserify": "^3.12.0",
3738
"domain-browser": "^4.22.0",
39+
"event-target-shim": "^6.0.2",
3840
"events": "^3.3.0",
3941
"https-browserify": "^1.0.0",
4042
"inherits": "^2.0.4",

0 commit comments

Comments
 (0)