Skip to content

Instantly share code, notes, and snippets.

@napestershine
Created October 4, 2018 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save napestershine/41efa934d8c24cd98518cd3033553213 to your computer and use it in GitHub Desktop.
Save napestershine/41efa934d8c24cd98518cd3033553213 to your computer and use it in GitHub Desktop.
require('dotenv').config();
const nodeExternals = require('webpack-node-externals');
// const resolve = (dir) => require('path').join(__dirname, dir)
module.exports = {
/** ENV variables */
env: {
recaptchaSitekey: 'some value',
},
/*
** Headers of the page
*/
head: {
title: 'Foodpaket',
meta: [
{charset: 'utf-8'},
{ 'http-equiv': 'X-UA-Compatible', content: 'IE-Edge'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
{hid: 'description', name: 'description', content: 'learning'}
],
link: [
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'},
{rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons'},
{rel: 'stylesheet', href: 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'},
{
rel: 'stylesheet',
href: 'https://use.fontawesome.com/releases/v5.0.6/css/all.css'
}
],
script: [
{
src: 'https://use.fontawesome.com/releases/v5.0.10/js/all.js',
integrity: 'sha384-slN8GvtUJGnv6ca26v8EzVaR9DC58QEwsIk9q1QXdCU8Yu8ck/tL/5szYlBbqmS+',
crossorigin: 'anonymous'
},
{
src: 'https://www.google.com/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit',
async: true,
defer: true
}
]
},
/*
** Customize the progress bar color
*/
loading: {color: '#3B8070'},
/*
** Build configuration
*/
build: {
babel: {
plugins: [
['transform-imports', {
'vuetify': {
'transform': 'vuetify/es5/components/${member}',
'preventFullImport': false
}
}]
]
},
extractCSS: true,
/*
** 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)/
// // })
// // }
// if (ctx.isServer) {
// config.externals = [
// nodeExternals({
// whitelist: [/^vuetify/]
// })
// ]
// }
// }
},
plugins: [
'~/plugins/plugins.js',
'~/plugins/filters.js',
// {
// src: '~/plugins/infinite-scroll.js',
// ssr:false
// }
],
css: [
'vuetify/src/stylus/app.styl',
'vuetify/src/stylus/main.styl',
'vue2-dropzone/dist/vue2Dropzone.css',
'@/assets/style/app.scss'
],
modules: [
'@nuxtjs/axios',
'@nuxtjs/auth',
'@nuxtjs/moment',
],
axios: {
baseURL: 'http://api.com'
},
auth: {
strategies: {
local: {
endpoints: {
login: {
url: '/api/v1/web/auth/login',
method: 'POST',
propertyName: 'access_token',
},
logout: {
url: '/api/v1/web/logout',
method: 'POST'
},
user: {
url: '/api/v1/web/user',
method: 'get',
propertyName: false
}
}
}
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment