-
-
Save martinrisseeuw/e1ffea12757710c4ff94ef1d95f5cf4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
module.exports = { | |
/* | |
** Headers of the page | |
*/ | |
head: { | |
title: 'Secrid.design', | |
meta: [ | |
{charset: 'utf-8'}, | |
{name: 'viewport', content: 'width=device-width, initial-scale=1'} | |
], | |
link: [ | |
{ rel: 'icon', href: '/favicon.ico' } | |
], | |
script: [ | |
{ src: 'https://maps.googleapis.com/maps/api/js?key=AIzaSyD2SpCGoAIGnwHM6c8YqnHi3HZji00yJxQ' }, | |
{ src: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js' } | |
] | |
}, | |
/* | |
** Customize the progress bar color | |
*/ | |
loading: false, | |
/* | |
** Build configuration | |
*/ | |
env: { | |
apiPath: process.env.API_PATH || 'http://localhost:8000/api' | |
}, | |
css: [ | |
'~assets/css/main.sass' | |
], | |
router: { | |
scrollBehavior: function (to, from, savedPosition) { | |
return { x: 0, y: 0 } | |
}, | |
extendRoutes (routes, resolve) { | |
routes.push({ | |
name: 'shop-id', | |
path: '/stores/shop/:id', | |
component: resolve(__dirname, 'pages/stores/index.vue') | |
}) | |
} | |
}, | |
modules: [ | |
'nuxt-device-detect', | |
'nuxt-sass-resources-loader', | |
'@nuxtjs/markdownit', | |
'@nuxtjs/axios', | |
['nuxt-i18n', { | |
locales: [ | |
{ | |
code: 'en', | |
iso: 'en-US', | |
name: 'English', | |
langFile: 'en.json' | |
}, | |
{ | |
code: 'nl', | |
iso: 'nl-NL', | |
name: 'Nederlands', | |
langFile: 'nl.json' | |
} | |
], | |
detectBrowserLanguage: true, | |
redirectCookieKey: 'redirected', | |
loadLanguagesAsync: true, | |
langDir: 'locales/', | |
defaultLocale: 'en', | |
vueI18n: { | |
fallbackLocale: 'en' | |
}, | |
routes: { | |
collection: { | |
en: '/collection', | |
nl: '/collectie' | |
}, | |
about: { | |
nl: 'over-ons' | |
} | |
} | |
}] | |
], | |
plugins: [ | |
'~/plugins/elements.js', | |
'~/plugins/components.js', | |
'~/plugins/compositions.js', | |
'~/plugins/animations.js', | |
{ src: '~/plugins/shop.js', ssr: false } | |
], | |
sassResources: [ | |
path.resolve('assets/css/resources.sass') | |
], | |
build: { | |
postcss: [ | |
require('postcss-baseline-grid-overlay'), | |
require('autoprefixer')({ | |
grid: true, | |
browsers: [ | |
'>1%', | |
'last 5 versions', | |
'Firefox ESR', | |
'not ie < 9' // React doesn't support IE8 anyway | |
], | |
flexbox: 'no-2009' | |
}) | |
], | |
/* | |
** Run ESLint on save | |
*/ | |
extend (config, ctx) { | |
if (ctx.isDev && ctx.isClient) { | |
config.module.rules.push({ | |
enforce: 'pre', | |
test: /\.(js|vue)$/, | |
loader: 'eslint-loader', | |
exclude: /(node_modules)/ | |
}) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment