diff --git a/packages/vue-app/template/server.js b/packages/vue-app/template/server.js index c6250caca8..0fe341f0a3 100644 --- a/packages/vue-app/template/server.js +++ b/packages/vue-app/template/server.js @@ -31,7 +31,7 @@ Vue.component(NuxtLink.name, NuxtLink) <% if (fetch.server) { %>if (!global.fetch) { global.fetch = fetch }<% } %> -const noopApp = () => new Vue({ render: h => h('div') }) +const noopApp = () => new Vue({ render: h => h('div', { domProps: { id: '<%= globals.id %>' } }) }) function urlJoin () { return Array.prototype.slice.call(arguments).join('/').replace(/\/+/g, '/') diff --git a/test/dev/basic.ssr.test.js b/test/dev/basic.ssr.test.js index fef1410991..acdc078ae8 100644 --- a/test/dev/basic.ssr.test.js +++ b/test/dev/basic.ssr.test.js @@ -183,21 +183,21 @@ describe('basic ssr', () => { const { html } = await nuxt.server.renderRoute('/redirect-external', renderContext) expect(_status).toBe(302) expect(_headers.Location).toBe('https://nuxtjs.org/docs/2.x/features/data-fetching/') - expect(html).toContain('
') + expect(html).toContain('') }) test('/redirect -> external link without trailing slash', async () => { const { html } = await nuxt.server.renderRoute('/redirect-external-no-slash', renderContext) expect(_status).toBe(302) expect(_headers.Location).toBe('https://nuxtjs.org/docs/2.x/features/data-fetching') - expect(html).toContain('') + expect(html).toContain('') }) test('/redirect -> external link with root domain url', async () => { const { html } = await nuxt.server.renderRoute('/redirect-external-root', renderContext) expect(_status).toBe(302) expect(_headers.Location).toBe('https://nuxtjs.org/') - expect(html).toContain('') + expect(html).toContain('') }) })