Add <base> when defined

This commit is contained in:
Sébastien Chopin 2016-11-10 20:21:16 +01:00
parent 24418134cd
commit 167962ccac
2 changed files with 2 additions and 0 deletions

View File

@ -143,6 +143,7 @@ class Nuxt {
}
const html = self.appTemplate({
dev: self.dev, // Use to add the extracted CSS <link> in production
baseUrl: (self.options.router.base !== '/' ? self.options.router.base : null),
APP: app,
context: context,
files: {

View File

@ -8,6 +8,7 @@
<html>
<head>
${title.toString()}
<% if (baseUrl) { %><base href="<%= baseUrl %>"><% } %>
<% if (!dev) { %><link rel="stylesheet" href="<%= files.css %>"><% } %>
</head>
<body>