mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
Check if app.html exists
This commit is contained in:
parent
66c5aad09d
commit
0e2474c681
@ -65,6 +65,11 @@ class Nuxt {
|
||||
if (fs.existsSync(join(this.srcDir, 'middleware'))) {
|
||||
this.options.middleware = true
|
||||
}
|
||||
// If app.html is defined, set the template path to the user template
|
||||
this.options.appTemplatePath = resolve(__dirname, 'views/app.template.html')
|
||||
if (fs.existsSync(join(this.srcDir, 'app.html'))) {
|
||||
this.options.appTemplatePath = join(this.srcDir, 'app.html')
|
||||
}
|
||||
// renderer used by Vue.js (via createBundleRenderer)
|
||||
this.renderer = null
|
||||
// For serving static/ files to /
|
||||
|
@ -56,7 +56,7 @@ export default function () {
|
||||
}),
|
||||
// Generate output HTML
|
||||
new HTMLPlugin({
|
||||
template: resolve(__dirname, 'views/app.template.html')
|
||||
template: this.options.appTemplatePath
|
||||
}),
|
||||
// Add defer to scripts
|
||||
new ScriptExtHtmlWebpackPlugin({
|
||||
|
Loading…
Reference in New Issue
Block a user