text: import colors from 'vuetify/es5/util/colors'
  
  const environment = process.env.NODE_ENV
  const env = require(`./env/${environment}.ts`)
  env.github = 'https://github.com/shibusawa-lab/lab1'
  
  const routerBase =
    process.env.DEPLOY_ENV === 'GH_PAGES'
      ? {
          router: {
            base: '/tei-js-pub/',
          },
        }
      : {}
  
  const GOOGLE_ANALYTICS_ID = 'abc'
  
  // path
  const baseUrl = env.BASE_URL || ''
  const baseDir = env.BASE_DIR || '/'
  const basePath = baseUrl + baseDir
  
  // meta
  const lang = 'ja'
  const siteName = 'TEI Viewer'
  env.siteName = siteName
  const siteDesc = 'TEI Viewer'
  const siteKeywords = 'TEI'
  
  // images
  const iconImages = basePath + 'img/icons/'
  const ogpImages = basePath + 'img/ogp/' // cdnPath + 'img/ogp/'
  const assets = basePath + 'assets/css/'
  
  // pwa
  const shortName = 'shibusawa'
  const manifestIcon = 'img/icons/icon-512.png'
  
  export default {
    // Disable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
    ssr: false,
  
    // Target (https://go.nuxtjs.dev/config-target)
    target: 'static',
  
    env,
  
    // Global page headers (https://go.nuxtjs.dev/config-head)
    // Global page headers (https://go.nuxtjs.dev/config-head)
    head: {
      htmlAttrs: {
        prefix: 'og: http://ogp.me/ns#',
        lang,
      },
      titleTemplate: `%s - ${siteName}`,
      title: siteName,
      meta: [
        { charset: 'utf-8' },
        { 'http-equiv': 'x-ua-compatible', content: 'ie=edge' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        {
          name: 'format-detection',
          content: 'telephone=no, email=no, address=no',
        },
        // SEO関連
        { hid: 'description', name: 'description', content: siteDesc },
        { hid: 'keywords', name: 'keywords', content: siteKeywords },
        // ogp関連
        {
          hid: 'og:site_name',
          property: 'og:site_name',
          content: siteName,
        },
        { hid: 'og:type', property: 'og:type', content: 'website' },
        { hid: 'og:url', property: 'og:url', content: basePath },
        { hid: 'og:title', property: 'og:title', content: siteName },
        {
          hid: 'og:description',
          property: 'og:description',
          content: siteDesc,
        },
        {
          hid: 'og:image',
          property: 'og:image',
          content: `${ogpImages}home.jpg`,
        },
        { name: 'twitter:card', content: 'summary_large_image' },
        // pwa iOS
        { name: 'apple-mobile-web-app-capable', content: 'yes' },
        {
          name: 'apple-mobile-web-app-status-bar-style',
          content: 'black-translucent',
        },
      ],
      script: [
        {
          src: 'https://code.jquery.com/jquery-3.3.1.slim.min.js',
          type: 'text/javascript',
        },
      ],
      link: [
        {
          rel: 'icon',
          sizes: '16x16',
          type: 'image/png',
          href: iconImages + 'favicon-16.png',
        },
        {
          rel: 'icon',
          sizes: '32x32',
          type: 'image/png',
          href: iconImages + 'favicon-32.png',
        },
        {
          rel: 'icon',
          sizes: '48x48',
          type: 'image/png',
          href: iconImages + 'favicon-48.png',
        },
        {
          rel: 'icon',
          sizes: '72x72',
          type: 'image/png',
          href: iconImages + 'favicon-72.png',
        },
        // apple touch icon
        {
          rel: 'apple-touch-icon',
          sizes: '180x180',
          href: iconImages + 'apple-touch-icon.png',
        },
        {
          rel: 'stylesheet',
          href: assets + 'CETEIcean.css',
        },
        /*
        {
          rel: 'stylesheet',
          href: assets + 'style.css',
        },
        */
        {
          rel: 'stylesheet',
          href: assets + 'CETEIcean2.css',
        },
      ],
    },
  
    manifest: {
      lang,
      name: siteName,
      short_name: shortName,
      description: siteDesc,
      background_color: '#ffffff',
      theme_color: '#ffffff',
      display: 'standalone',
      orientation: 'portrait',
    },
    icon: {
      iconFileName: manifestIcon,
    },
  
    loading: { color: '#E64A19', height: '5px' },
  
    // Global CSS (https://go.nuxtjs.dev/config-css)
    css: [],
  
    // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
    plugins: ['~/plugins/vue-scrollto'],
  
    // 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',
      // https://go.nuxtjs.dev/vuetify
      '@nuxtjs/vuetify',
      '@nuxtjs/moment',
    ],
  
    moment: {
      // ここにオプションが記述できる
      locales: ['ja'],
    },
  
    // Modules (https://go.nuxtjs.dev/config-modules)
    modules: [
      // https://go.nuxtjs.dev/axios
      '@nuxtjs/axios',
      // https://go.nuxtjs.dev/pwa
      '@nuxtjs/pwa',
      '@nuxtjs/sitemap',
      'nuxt-i18n',
      [
        '@nuxtjs/google-analytics',
        {
          id: GOOGLE_ANALYTICS_ID,
        },
      ],
    ],
  
    sitemap: {
      path: '/sitemap.xml',
      hostname: baseUrl,
    },
  
    // Axios module configuration (https://go.nuxtjs.dev/config-axios)
    axios: {},
  
    // Vuetify module configuration (https://go.nuxtjs.dev/config-vuetify)
    vuetify: {
      customVariables: ['~/assets/variables.scss'],
      theme: {
        dark: false,
        themes: {
          dark: {
            primary: colors.blue.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,
          },
        },
      },
    },
  
    i18n: {
      locales: [
        { code: 'en', iso: 'en_US', file: 'en.json' },
        { code: 'ja', iso: 'ja_JP', file: 'ja.json' },
      ],
      defaultLocale: 'ja',
      vueI18nLoader: true,
      lazy: true,
      langDir: 'lang/',
      // strategy: 'no_prefix'
    },
  
    // Build Configuration (https://go.nuxtjs.dev/config-build)
    build: {
      babel: {
        plugins: [
          ['@babel/plugin-proposal-decorators', { legacy: true }],
          ['@babel/plugin-proposal-class-properties', { loose: true }],
        ],
      },
    },
  
    ...routerBase,
  
    generate: {},
  }
  