Skip to content

Commit

Permalink
feat(config): add support for ember-data >=4.12
Browse files Browse the repository at this point in the history
See reasoning and suggested fix [here](emberjs/data#8475)
  • Loading branch information
abeforgit committed Nov 2, 2023
1 parent 2509228 commit d665ab4
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ let fastbootAppServer = new FastbootAppServer({
gzip: true,
log: true,
buildSandboxGlobals(defaultGlobals) {
return Object.assign(
{},
defaultGlobals,
{BACKEND_URL: "http://backend"}
);
return Object.assign({}, defaultGlobals, {
AbortController,
ReadableStream:
typeof ReadableStream !== "undefined"
? ReadableStream
: require("node:stream/web").ReadableStream,
WritableStream:
typeof WritableStream !== "undefined"
? WritableStream
: require("node:stream/web").WritableStream,
TransformStream:
typeof TransformStream !== "undefined"
? TransformStream
: require("node:stream/web").TransformStream,
Headers: typeof Headers !== "undefined" ? Headers : undefined,
BACKEND_URL: "http://backend",
});
},
});

Expand Down

0 comments on commit d665ab4

Please sign in to comment.