First of all, I wanted to say thanks for all your hard work. Nuxt.js rocks!
Second, I stumbled upon an issue with generated static sites, using Vuetify with a custom theme. The custom theme's style tag isn't generated for all pages. In SSR mode everything works perfectly.
Here's my nuxt.config.js
:
const { DateTime } = require('luxon');
const git = require('git-rev-sync');
const appConfig = require('./config')[process.env.NODE_ENV];
module.exports = {
/*
** Headers of the page
*/
head: {
titleTemplate: 'CallVU | %s',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: 'CallVU Form Studio',
},
{
referrer: 'no-referrer',
},
],
link: [
{ rel: 'icon', type: 'image/png', href: './icon.png' },
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons',
},
],
},
modules: ['@nuxtjs/axios', 'nuxt-device-detect'],
axios: {
baseURL: appConfig.API,
},
plugins: [
'~/plugins/vue-signature-pad.js',
'~/plugins/v-clipboard.js',
'~/plugins/drag-drop.js',
'~/plugins/vuetify.js',
'~/plugins/filters.js',
'~/plugins/i18n.js',
],
css: ['~/assets/style/app.styl'],
/*
** Customize the progress bar color
*/
loading: { color: '#06CE9F' },
/*
** Build configuration
*/
build: {
vendor: ['vuetify', 'vue-i18n'],
extractCSS: true,
/*
** Run ESLint on save
*/
extend(config, ctx) {
if (ctx.dev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/,
});
}
},
},
router: {
middleware: 'i18n',
base: process.env.NODE_ENV === 'development' ? '/' : '/cv-form-studio/',
},
env: {
VER: process.env.npm_package_version,
COMMIT: git.short(),
BRANCH: git.branch(),
BUILD_TIME: DateTime.local().toISODate(),
...appConfig,
},
};
and my Vuetify plugin:
import Vue from 'vue';
import Vuetify from 'vuetify';
Vue.use(Vuetify, {
theme: {
primary: '#353E67',
accent: '#06CE9F',
},
});
Edit: I also noticed that the head
meta-data for the page isn't rendered.