mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
[vue-style-loader] Inline global css on SSR
Currently with `<style src>` approach global styles are injected on runtime only and this may affect page render performance.
This commit is contained in:
parent
01b02a9010
commit
e2e849fbd2
@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
<% if (loading) { %>import NuxtLoading from '<%= (typeof loading === "string" ? loading : "./components/nuxt-loading.vue") %>'<% } %>
|
<% if (loading) { %>import NuxtLoading from '<%= (typeof loading === "string" ? loading : "./components/nuxt-loading.vue") %>'<% } %>
|
||||||
|
<% css.forEach(function (c) { %>
|
||||||
|
import '<%= c.src || c %>'
|
||||||
|
<% }) %>
|
||||||
|
|
||||||
let layouts = {
|
let layouts = {
|
||||||
<%
|
<%
|
||||||
@ -61,6 +64,3 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<% css.forEach(function (c) { %>
|
|
||||||
<style src="<%= (typeof c === 'string' ? c : c.src) %>" lang="<%= (c.lang ? c.lang : 'css') %>"></style>
|
|
||||||
<% }) %>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user