mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
refactor: add script in meta example
This commit is contained in:
parent
e97bb1d099
commit
7e71de4d6e
@ -11,6 +11,12 @@ export default {
|
||||
title: 'Home page 🚀',
|
||||
meta: [
|
||||
{ hid: 'description', name: 'description', content: 'Home page description' }
|
||||
],
|
||||
script: [
|
||||
{ src: '/head.js' },
|
||||
// will be supported in the near future
|
||||
{ src: '/body.js', body: true },
|
||||
{ src: '/defer.js', defer: undefined }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
1
examples/head-elements/static/about.js
Normal file
1
examples/head-elements/static/about.js
Normal file
@ -0,0 +1 @@
|
||||
console.log('about.js loaded!') // eslint-disable-line no-console
|
1
examples/head-elements/static/body.js
Normal file
1
examples/head-elements/static/body.js
Normal file
@ -0,0 +1 @@
|
||||
console.log('body.js loaded!') // eslint-disable-line no-console
|
1
examples/head-elements/static/defer.js
Normal file
1
examples/head-elements/static/defer.js
Normal file
@ -0,0 +1 @@
|
||||
console.log('defer.js loaded!') // eslint-disable-line no-console
|
1
examples/head-elements/static/head.js
Normal file
1
examples/head-elements/static/head.js
Normal file
@ -0,0 +1 @@
|
||||
console.log('head.js loaded!') // eslint-disable-line no-console
|
Loading…
Reference in New Issue
Block a user