@dakingindanorf/hive
Version:
A template for creating a nuxt generated static site using Netlify CMS to power the backend. Individual site components can be managed through Bit
123 lines (122 loc) • 3.17 kB
JavaScript
export default {
target: 'static',
ssr: false,
components: [
{
path: '~/components',
global: 'dev'
},
{
path: '~/hive',
global: 'dev'
},
{
path: '~/bits/components',
pathPrefix: false,
global: 'dev'
}
],
/*
** Headers of the page
*/
head: {
title: 'Hive',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'A static site template to make site building and extending easier for users and developers. Using Netlify CMS, Bit, and built with the Nuxt.js static site generator.' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Montserrat:500,900i&display=swap' }
],
script: [
{ src: 'https://js.stripe.com/v3/', body: true }
]
},
sitemap: {
path: '/sitemap.xml',
hostname: 'https://hive.dev',
trailingSlash: true,
cacheTime: 1000 * 60 * 15,
gzip: true,
exclude: [],
routes: []
},
content: {
dir: './content/'
},
generate: { fallback: '404.html' },
publicRuntimeConfig: {},
privateRuntimeConfig: {
netlify_auth_token: process.env.NETLIFY_AUTH_TOKEN
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
styleResources: {
scss: [
'./assets/scss/main.scss'
]
},
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js modules
*/
modules: [
'@nuxt/content',
'@nuxtjs/axios',
'@nuxtjs/sitemap'
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxtjs/eslint-module',
'@nuxtjs/style-resources'
],
/*
** Build configuration
*/
build: {
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
config.node = {
fs: 'empty'
}
config.module.rules.push({
test: /\.(js|vue)$/,
loader: 'import-glob'
})
},
loaders: {
scss: { sourceMap: false }
},
babel: {
presets({ isServer }) {
return [
[
require.resolve('@nuxt/babel-preset-app'),
{
buildTarget: isServer ? 'server' : 'client',
corejs: { version: 3 }
}
]
]
}
}
}
}