diff --git a/packages/vue-app/template/App.js b/packages/vue-app/template/App.js index 1b5c33767b..fdc81a3c6f 100644 --- a/packages/vue-app/template/App.js +++ b/packages/vue-app/template/App.js @@ -18,7 +18,7 @@ const layouts = { <%= Object.keys(layouts).map(key => `"_${key}": _${hash(key)}` export default { <%= isTest ? '/* eslint-disable quotes, semi, indent, comma-spacing, key-spacing, object-curly-spacing, object-property-newline, arrow-parens */' : '' %> - head: <%= serialize(head).replace(/:\w+\(/gm, ':function(') %>, + head: <%= serialize(head).replace(/:\w+\(/gm, ':function(').replace('head(', 'function(') %>, <%= isTest ? '/* eslint-enable quotes, semi, indent, comma-spacing, key-spacing, object-curly-spacing, object-property-newline, arrow-parens */' : '' %> render(h, props) { <% if (loading) { %>const loadingEl = h('nuxt-loading', { ref: 'loading' })<% } %> diff --git a/test/fixtures/basic/nuxt.config.js b/test/fixtures/basic/nuxt.config.js index b5c802eb60..0c716e5be0 100644 --- a/test/fixtures/basic/nuxt.config.js +++ b/test/fixtures/basic/nuxt.config.js @@ -36,9 +36,11 @@ export default { interval: 200, subFolders: true }, - head: { - titleTemplate: (titleChunk) => { - return titleChunk ? `${titleChunk} - Nuxt.js` : 'Nuxt.js' + head() { + return { + titleTemplate: (titleChunk) => { + return titleChunk ? `${titleChunk} - Nuxt.js` : 'Nuxt.js' + } } }, modulesDir: path.join(__dirname, '..', '..', '..', 'node_modules'),