Skip to content

Commit 6f2ae1d

Browse files
committed
Add atob and XMLHttpRequest fastboot sandbox globals
1 parent c785e55 commit 6f2ae1d

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

config/fastboot.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
const atob = require('atob');
2+
const XMLHttpRequest = require('xmlhttprequest-ssl').XMLHttpRequest;
3+
14
module.exports = function (/* environment */) {
25
return {
36
/*
@@ -11,8 +14,10 @@ module.exports = function (/* environment */) {
1114
*/
1215
buildSandboxGlobals(defaultGlobals) {
1316
return Object.assign({}, defaultGlobals, {
17+
atob,
1418
AbortController,
1519
URLSearchParams,
20+
XMLHttpRequest,
1621
});
1722
},
1823
};

package-lock.json

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"@typescript-eslint/eslint-plugin": "^8.45.0",
108108
"@typescript-eslint/parser": "^8.29.1",
109109
"@uiw/codemirror-theme-github": "^4.25.1",
110+
"atob": "^2.1.2",
110111
"autoprefixer": "^10.4.21",
111112
"broccoli-asset-rev": "^3.0.0",
112113
"canvas-confetti": "^1.9.3",
@@ -195,7 +196,8 @@
195196
"tracked-built-ins": "^4.0.0",
196197
"typescript": "^5.8.3",
197198
"webpack": "^5.101.3",
198-
"webpack-bundle-analyzer": "^4.10.2"
199+
"webpack-bundle-analyzer": "^4.10.2",
200+
"xmlhttprequest-ssl": "^4.0.0"
199201
},
200202
"engines": {
201203
"node": "22.*"

0 commit comments

Comments
 (0)