import { NuxtConfig } from '@nuxt/types'
|
|
|
|
export default async (): Promise<NuxtConfig> => {
|
|
const NODE_ENV = process.env['NODE_ENV'] || ''
|
|
|
|
return {
|
|
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
|
|
ssr: false,
|
|
|
|
// Target: https://go.nuxtjs.dev/config-target
|
|
target: 'static',
|
|
|
|
// Global page headers: https://go.nuxtjs.dev/config-head
|
|
head: {
|
|
title: 'WaniKani-based jaquiz',
|
|
meta: [
|
|
{ charset: 'utf-8' },
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
{
|
|
hid: 'description',
|
|
name: 'description',
|
|
content: 'WaniKani-based jaquiz',
|
|
},
|
|
{ name: 'format-detection', content: 'telephone=no' },
|
|
],
|
|
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
|
},
|
|
|
|
// Global CSS: https://go.nuxtjs.dev/config-css
|
|
css: [],
|
|
|
|
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
|
|
plugins: ['~/plugins/filter.ts', '~/plugins/vue-context.client.js'],
|
|
|
|
// Auto import components: https://go.nuxtjs.dev/config-components
|
|
components: true,
|
|
|
|
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
|
|
buildModules: [
|
|
// https://go.nuxtjs.dev/typescript
|
|
'@nuxt/typescript-build',
|
|
'nuxt-typed-vuex',
|
|
],
|
|
|
|
// Modules: https://go.nuxtjs.dev/config-modules
|
|
modules: [
|
|
// https://go.nuxtjs.dev/buefy
|
|
[
|
|
'nuxt-buefy',
|
|
{
|
|
defaultIconPack: 'fas',
|
|
defaultIconComponent: 'fontawesome',
|
|
},
|
|
],
|
|
// https://go.nuxtjs.dev/pwa
|
|
'@nuxtjs/pwa',
|
|
'@nuxtjs/proxy',
|
|
[
|
|
'@nuxtjs/fontawesome',
|
|
{
|
|
component: 'fontawesome',
|
|
icons: {
|
|
brands: ['faGithub'],
|
|
solid: [
|
|
'faAngleLeft',
|
|
'faAngleRight',
|
|
'faAngleUp',
|
|
'faArrowUp',
|
|
'faBookReader',
|
|
'faCaretDown',
|
|
'faCaretUp',
|
|
'faChalkboardTeacher',
|
|
'faCog',
|
|
'faExclamationCircle',
|
|
'faExclamationTriangle',
|
|
'faEye',
|
|
'faEyeSlash',
|
|
'faInfoCircle',
|
|
'faRandom',
|
|
'faSearch',
|
|
'faTag',
|
|
'faListUl',
|
|
'faListOl',
|
|
'faBars',
|
|
'faSave',
|
|
'faTrash',
|
|
'faTools',
|
|
'faTh',
|
|
'faRedoAlt',
|
|
],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
// PWA module configuration: https://go.nuxtjs.dev/pwa
|
|
pwa: {
|
|
manifest: {
|
|
lang: 'en',
|
|
},
|
|
},
|
|
|
|
proxy: {
|
|
'/api': 'http://localhost:35594',
|
|
},
|
|
|
|
env: {
|
|
NODE_ENV,
|
|
},
|
|
|
|
// Build Configuration: https://go.nuxtjs.dev/config-build
|
|
build: {},
|
|
}
|
|
}
|