Created
August 12, 2019 09:44
-
-
Save 1242035/805a3d8b6d713673e54e8b5f6df76831 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 HOST_URL = process.env.BASE_URL || 'http://localhost:3000'; | |
//const API_URL = process.env.BASE_API_URL || 'http://14.225.11.12:3030/api/client'; | |
const API_URL = process.env.BASE_API_URL || 'http://localhost:3000'; | |
const webpack = require("webpack"); | |
module.exports = { | |
mode: 'spa', | |
dev: (process.env.NODE_ENV !== 'production'), | |
/* | |
Global env variable | |
*/ | |
env: { | |
baseUrl: HOST_URL, | |
api:{ | |
host: API_URL | |
} | |
}, | |
/* | |
** Headers of the page | |
*/ | |
head: { | |
title: 'spotech', | |
meta: [ | |
{ charset: 'utf-8' }, | |
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }, | |
{ hid: 'description', name: 'description', content: 'spotech project' } | |
], | |
link: [ | |
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } | |
] | |
}, | |
/* | |
** Customize the progress bar color | |
*/ | |
loading: { color: '#3B8070' }, | |
css:[ | |
'~/assets/scss/styles', | |
// 'bootstrap/dist/css/bootstrap.css', | |
'swiper/dist/css/swiper.css', | |
'@mdi/font/css/materialdesignicons.css', | |
'@fortawesome/fontawesome-free/css/all.css', | |
'select2/dist/css/select2.min.css', | |
'~/assets/scss/app.css', | |
], | |
/* | |
** Build configuration | |
*/ | |
build: { | |
/* | |
** You can extend webpack config here | |
*/ | |
vendor: ["jquery", "bootstrap"], | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
$: "jquery" | |
}) | |
], | |
extractCSS: true, | |
cssSourceMap: true, | |
extend(config, ctx) { | |
} | |
}, | |
plugins:[ | |
'~/plugins/components', | |
'~/plugins/elementUI', | |
], | |
modules: [ | |
'@nuxtjs/auth', | |
'@nuxtjs/pwa', | |
'@nuxtjs/proxy', | |
'@nuxtjs/axios', | |
[ | |
'nuxt-i18n', | |
{ | |
locales: [ | |
{ code: 'en', iso: 'en-US', file: 'en.js' }, | |
{ code: 'ja', iso: 'ja-JP', file: 'ja.js' }, | |
{ code: 'vi', iso: 'vi-VN', file: 'vi.js' } | |
], | |
defaultLocale: 'ja', | |
vueI18n: { | |
fallbackLocale: 'ja' | |
}, | |
lazy: true, | |
langDir: 'locales/' | |
} | |
], | |
], | |
axios: { | |
//proxy: true, | |
proxyHeaders: false, | |
credentials: false, | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
} | |
}, | |
proxy: [ | |
// auth linkedin | |
'https://www.linkedin.com/oauth/v2/accessToken', | |
], | |
vue: { | |
config: { | |
productionTip: false, | |
devtools: true | |
} | |
}, | |
auth: { | |
strategies: { | |
local: { | |
endpoints: { | |
login: { url: API_URL + '/api/auth/login', method: 'post', propertyName: 'token' }, | |
logout: { url: API_URL + '/api/auth/logout', method: 'post' }, | |
user: { url: API_URL + '/api/auth/user', method: 'get', propertyName: 'user' } | |
}, | |
// tokenRequired: true, | |
// tokenType: 'bearer' | |
}, | |
facebook: { | |
client_id: '.......', | |
userinfo_endpoint: 'https://graph.facebook.com/v3.3/me?fields=about,name,picture{url},email,birthday', | |
scope: ['public_profile', 'email', 'user_birthday'] | |
}, | |
google: { | |
client_id: '................apps.googleusercontent.com' | |
}, | |
linkedin: { | |
_scheme: 'oauth2', | |
_name: 'linkedin', | |
authorization_endpoint: 'https://www.linkedin.com/oauth/v2/authorization', | |
userinfo_endpoint: 'https://api.linkedin.com/v2/me', | |
scope: ['r_basicprofile', 'r_emailaddress'], | |
access_token_endpoint: 'https://www.linkedin.com/oauth/v2/accessToken', | |
client_id: '.................', | |
token_key: 'access_token', | |
token_type: 'Bearer', | |
response_type: 'code', | |
grant_type: 'authorization_code', | |
}, | |
'laravel.passport': { | |
url: '...', | |
client_id: '...', | |
client_secret: '...' | |
}, | |
} | |
}, | |
//serverMiddleware: ['~/server'], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment