Created
April 4, 2021 12:16
-
-
Save jnarowski/a740922bba3d9d1127ae239530773eaa 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
export default { | |
target: 'server', | |
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules | |
// Build Configuration: https://go.nuxtjs.dev/config-build | |
build: { | |
transpile: ['vue-slicezone', 'nuxt-sm'], | |
}, | |
buildModules: [ | |
// https://go.nuxtjs.dev/eslint | |
'@nuxtjs/eslint-module', // https://go.nuxtjs.dev/tailwindcss | |
'@nuxtjs/tailwindcss', | |
'@nuxtjs/google-analytics', | |
'@braid/vue-formulate/nuxt', | |
// https://blog.logrocket.com/handling-server-side-applications-with-nuxts-composition-api/ | |
'@nuxtjs/composition-api', | |
], | |
// Global CSS: https://go.nuxtjs.dev/config-css | |
css: [ | |
'~assets/styles/global.scss', | |
'~assets/styles/tailwind.css', | |
// 'vue-essential-slices/src/styles/styles.scss', | |
], | |
// Auto import components: https://go.nuxtjs.dev/config-components | |
components: true, | |
// Global page headers: https://go.nuxtjs.dev/config-head | |
head: { | |
title: 'microsaascollective', | |
meta: [ | |
{ | |
charset: 'utf-8', | |
}, | |
{ | |
name: 'viewport', | |
content: 'width=device-width, initial-scale=1, shrink-to-fit=no', | |
}, | |
{ | |
hid: 'description', | |
name: 'description', | |
content: '', | |
}, | |
], | |
link: [ | |
{ | |
rel: 'icon', | |
type: 'image/x-icon', | |
href: '/favicon.ico', | |
}, | |
{ | |
type: 'stylesheet', | |
href: 'https://rsms.me/inter/inter.css', | |
}, | |
], | |
script: [ | |
{ | |
src: | |
'https://cdn.polyfill.io/v2/polyfill.min.js?features=Element.prototype.classList', | |
}, | |
], | |
}, | |
// Modules: https://go.nuxtjs.dev/config-modules | |
modules: [ | |
// https://go.nuxtjs.dev/axios | |
'@nuxtjs/auth-next', | |
'@nuxtjs/axios', // https://go.nuxtjs.dev/pwa | |
// '@nuxtjs/pwa', | |
[ | |
'@nuxtjs/prismic', | |
{ | |
endpoint: 'https://microsaascollective.cdn.prismic.io/api/v2', | |
apiOptions: { | |
routes: [ | |
{ | |
type: 'page', | |
path: '/:uid', | |
}, | |
], | |
}, | |
}, | |
], | |
['nuxt-sm'], | |
], | |
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins | |
plugins: [ | |
'~plugins/base-bus.js', | |
'~plugins/base-toast.js', | |
'~plugins/base-onboarding.js', | |
'~plugins/base-filters.js', | |
{ src: '~plugins/vue-actioncable.js', mode: 'client' }, | |
'~plugins/vue-select.js', | |
'~plugins/vue-multiselect.js', | |
// { src: '~plugins/vue-multiselect.js', mode: 'client' }, | |
], | |
// ------------------------------------------------------------- | |
// Plugin specific config | |
// ------------------------------------------------------------- | |
// Nuxt Auth setup: https://auth.nuxtjs.org/guide/setup | |
auth: { | |
watchLoggedIn: true, | |
redirect: { | |
login: '/auth/login', | |
logout: '/auth/login', | |
home: '/projects', | |
}, | |
strategies: { | |
deviseStrategy: { | |
scheme: '~/plugins/auth/deviseScheme', | |
endpoints: { | |
login: { url: '/users/sign_in.json', method: 'post' }, | |
logout: { url: '/users/sign_out', method: 'delete' }, | |
user: { url: '/api/v1/users/me', method: 'get' }, | |
}, | |
}, | |
}, | |
}, | |
// Axios module configuration: https://go.nuxtjs.dev/config-axios | |
axios: { | |
baseURL: process.env.API_URL || 'http://localhost:4000', | |
requestInterceptor: (config, { store }) => { | |
const qs = require('qs') | |
config.paramsSerializer = (params) => { | |
return qs.stringify(params, { arrayFormat: 'brackets' }) | |
} | |
return config | |
}, | |
}, | |
googleAnalytics: { | |
id: 'UA-7419920-17', | |
}, | |
env: { | |
API_URL: process.env.API_URL || 'http://localhost:4000', | |
CLIENT_URL: process.env.CLIENT_URL || 'http://localhost:3000', | |
}, | |
// PWA module configuration: https://go.nuxtjs.dev/pwa | |
// pwa: { | |
// manifest: { | |
// lang: 'en', | |
// }, | |
// }, | |
storybook: { | |
stories: ['~/slices/**/*.stories.js'], | |
}, | |
serverMiddleware: [ | |
{ | |
path: 'api/google-trends', | |
handler: '~/api/googleTrends.js', | |
}, | |
], | |
tailwindcss: { | |
jit: true, | |
}, | |
ignore: ['**/*.stories.js'], | |
router: { | |
middleware: ['auth'], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment