Skip to content

Instantly share code, notes, and snippets.

@robertz
Created February 24, 2018 02:05
Show Gist options
  • Save robertz/1f05137fa62da8a0638fd2d9d45efd45 to your computer and use it in GitHub Desktop.
Save robertz/1f05137fa62da8a0638fd2d9d45efd45 to your computer and use it in GitHub Desktop.
Nuxt application config
module.exports = {
/*
** Router config
*/
router: {
middleware: "check-auth"
},
/*
** Headers of the page
*/
head: {
title: "nuxt-billz",
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ hid: "description", name: "description", content: "Nuxt.js project" }
],
link: [
{ rel: "icon", type: "image/x-icon", href: "https://nuxtjs.org/favicon.ico" },
{ rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.0/css/bulma.min.css' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700' }
]
},
css: [],
build: {
vendor: ['axios'],
extend (config, ctx) {
if (ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
});
}
}
},
serverMiddleware: [
'~/api/index.js'
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment