diff --git a/packages/server/src/server.js b/packages/server/src/server.js index 3cfd13d893..86f9cdfdae 100644 --- a/packages/server/src/server.js +++ b/packages/server/src/server.js @@ -215,11 +215,17 @@ export default class Server { return this.renderer.loadResources.apply(this.renderer, arguments) } - renderAndGetWindow (url, opts = {}) { + renderAndGetWindow (url, opts = {}, { + loadingTimeout = 2000, + loadedCallback = this.globals.loadedCallback, + ssr = this.options.render.ssr, + globals = this.globals + } = {}) { return renderAndGetWindow(url, opts, { - loadedCallback: this.globals.loadedCallback, - ssr: this.options.render.ssr, - globals: this.globals + loadingTimeout, + loadedCallback, + ssr, + globals }) } diff --git a/packages/server/test/server.test.js b/packages/server/test/server.test.js index 60336b7645..67c982f380 100644 --- a/packages/server/test/server.test.js +++ b/packages/server/test/server.test.js @@ -445,6 +445,7 @@ describe('server: server', () => { expect(renderAndGetWindow).toBeCalledTimes(1) expect(renderAndGetWindow).toBeCalledWith('/render/window', {}, { + loadingTimeout: 2000, loadedCallback: globals.loadedCallback, ssr: nuxt.options.render.ssr, globals