| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- import path from 'path'
- const colors = require('vuetify/es5/util/colors').default
- export default {
- mode: 'universal',
- /*
- ** Headers of the page
- */
- head: {
- titleTemplate: '%s - ' + process.env.npm_package_name,
- title: process.env.npm_package_name || '',
- meta: [
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- {
- hid: 'description',
- name: 'description',
- content: process.env.npm_package_description || ''
- }
- ],
- link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
- },
- /*
- ** Customize the progress-bar color
- */
- loading: { color: '#fff' },
- /*
- ** Global CSS
- */
- css: [
- 'katex/dist/katex.min.css',
- 'github-markdown-css/github-markdown.css',
- 'prismjs/themes/prism-tomorrow.css'
- ],
- /*
- ** Plugins to load before mounting the App
- */
- plugins: [{ src: '~/plugins/codemirror.ts', mode: 'client' }],
- /*
- ** Nuxt.js dev-modules
- */
- buildModules: ['@nuxtjs/vuetify', '@nuxt/typescript-build', 'nuxt-typed-vuex'],
- /*
- ** Nuxt.js modules
- */
- modules: [
- // Doc: https://axios.nuxtjs.org/usage
- '@nuxtjs/axios',
- 'nuxt-i18n'
- ],
- i18n: {
- locales: ['zh-CN'],
- defaultLocale: 'zh-CN',
- vueI18n: {
- fallbackLocale: 'zh-CN',
- messages: {
- 'zh-CN': require('./locales/zh-CN.json')
- }
- }
- },
- /*
- ** Axios module configuration
- ** See https://axios.nuxtjs.org/options
- */
- axios: {
- baseURL: 'http://localhost:9090'
- },
- /*
- ** vuetify module configuration
- ** https://github.com/nuxt-community/vuetify-module
- */
- vuetify: {
- customVariables: ['~/assets/variables.sass'],
- theme: {
- // dark: false,
- themes: {
- dark: {
- primary: colors.purple.darken2,
- accent: colors.grey.darken3,
- secondary: colors.amber.darken3,
- info: colors.teal.lighten1,
- warning: colors.amber.base,
- error: colors.deepOrange.accent4,
- success: colors.green.accent3
- }
- // light: {
- // primary: colors.purple.darken1,
- // accent: colors.grey.darken3,
- // secondary: colors.amber.darken3,
- // info: colors.teal.lighten1,
- // warning: colors.amber.base,
- // error: colors.deepOrange.accent4,
- // success: colors.green.accent3
- // }
- }
- }
- },
- typescript: {
- typeCheck: {
- eslint: true
- }
- },
- /*
- ** Build configuration
- */
- build: {
- /*
- ** You can extend webpack config here
- */
- transpile: [/typed-vuex/],
- extend(config: any) {
- config.module.rules.push({
- test: /\.md$/,
- use: [{ loader: 'html-loader' }, { loader: path.resolve('./util/markdown/markdown-loader.ts') }]
- })
- config.module.rules.push({
- test: /\.scss$/,
- use: [
- 'vue-style-loader',
- 'css-loader',
- {
- loader: 'sass-loader',
- options: {
- indentedSyntax: true,
- // sass-loader version >= 8
- sassOptions: {
- indentedSyntax: true
- }
- }
- }
- ]
- })
- }
- }
- }
|