mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-24 10:06:41 +00:00
Add <base> when defined
This commit is contained in:
parent
24418134cd
commit
167962ccac
@ -143,6 +143,7 @@ class Nuxt {
|
|||||||
}
|
}
|
||||||
const html = self.appTemplate({
|
const html = self.appTemplate({
|
||||||
dev: self.dev, // Use to add the extracted CSS <link> in production
|
dev: self.dev, // Use to add the extracted CSS <link> in production
|
||||||
|
baseUrl: (self.options.router.base !== '/' ? self.options.router.base : null),
|
||||||
APP: app,
|
APP: app,
|
||||||
context: context,
|
context: context,
|
||||||
files: {
|
files: {
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
${title.toString()}
|
${title.toString()}
|
||||||
|
<% if (baseUrl) { %><base href="<%= baseUrl %>"><% } %>
|
||||||
<% if (!dev) { %><link rel="stylesheet" href="<%= files.css %>"><% } %>
|
<% if (!dev) { %><link rel="stylesheet" href="<%= files.css %>"><% } %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
Reference in New Issue
Block a user