refactor: add script in meta example

This commit is contained in:
Clark Du 2017-11-06 10:16:26 +08:00
parent e97bb1d099
commit 7e71de4d6e
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
5 changed files with 10 additions and 0 deletions

View File

@ -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 }
]
}
}

View File

@ -0,0 +1 @@
console.log('about.js loaded!') // eslint-disable-line no-console

View File

@ -0,0 +1 @@
console.log('body.js loaded!') // eslint-disable-line no-console

View File

@ -0,0 +1 @@
console.log('defer.js loaded!') // eslint-disable-line no-console

View File

@ -0,0 +1 @@
console.log('head.js loaded!') // eslint-disable-line no-console