text: import path from 'path'
  import postcssImport from 'postcss-import'
  import postcssNesting from 'postcss-nesting'
  import postcssPresetEnv from 'postcss-preset-env'
  import postcssEasingGradients from 'postcss-easing-gradients'
  import * as SITE_INFO from './content/site/info.json'
  
  export default {
    target: 'static',
    components: true,
    generate: {
      fallback: true
    },
    // ? The env Property: https://nuxtjs.org/api/configuration-env/
    env: {
      url: process.env.NODE_ENV === 'production' ? process.env.URL || 'https://laurie.nz' : 'http://localhost:3000',
      lang: SITE_INFO.sitelang || 'en-NZ'
    },
    /*
     ** Headers of the page
     */
    head: {
      title: SITE_INFO.sitename || process.env.npm_package_name || '',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        {
          hid: 'description',
          name: 'description',
          content: SITE_INFO.sitedescription || process.env.npm_package_description || ''
        }
      ],
      link: [
        {
          rel: 'preconnect',
          href: 'https://fonts.gstatic.com',
          crossorigin: true
        },
        {
          rel: 'preload',
          as: 'style',
          href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap'
        },
        {
          rel: 'stylesheet',
          href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap',
          media: 'print',
          onload: `this.media='all'`
        }
      ], // ? Imports the font 'Inter', can be optimized by the netlify plugin 'Subfont' by uncommenting it in `netlify.toml`
      noscript: [
        {
          innerHTML:
            '<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">'
        }
      ],
      __dangerouslyDisableSanitizers: ['noscript']
    },
    /*
     ** Customize the progress-bar color
     */
    loading: { color: '#526488' },
    /*
     ** Global CSS
     */
    css: ['@/assets/css/main.css'],
    /*
     ** Plugins to load before mounting the App
     */
    plugins: ['~/plugins/vue-content-placeholders.js'],
    /*
     ** Nuxt.js dev-modules
     */
    buildModules: ['@nuxtjs/tailwindcss', '@nuxtjs/svg', '@nuxtjs/pwa'],
    /*
     ** Nuxt.js modules
     */
    modules: ['@nuxt/content', 'nuxt-purgecss'],
    /*
     ** Build configuration
     */
    build: {
      extractCSS: true,
      postcss: {
        plugins: {
          'postcss-import': postcssImport,
          tailwindcss: path.resolve(__dirname, './tailwind.config.js'),
          'postcss-nesting': postcssNesting,
          'postcss-preset-env': postcssPresetEnv({
            stage: 1,
            features: {
              'nesting-rules': false
            }
          }),
          'postcss-easing-gradients': postcssEasingGradients
        }
      },
      /*
       ** You can extend webpack config here
       */
      extend(config, ctx) {}
    },
    /*
     ** Custom additions configuration
     */
    // ? The content property: https://content.nuxtjs.org/configuration
    content: {
      dir: 'content'
    },
    tailwindcss: {
      cssPath: '~/assets/css/main.css',
      exposeConfig: false // enables `import { theme } from '~tailwind.config'`
    },
    purgeCSS: {
      mode: 'postcss',
      // ? Whitelisting docs: https://v1.purgecss.com/whitelisting
      whitelist: ['dark-mode', 'light-mode', 'btn', 'icon', 'main'],
      whitelistPatterns: [/^card/, /^nuxt-content/, /image$/, /title$/],
      whitelistPatternsChildren: [/^nuxt-content/, /code/, /pre/, /token/, /^vue-content-placeholders/]
    },
    pwa: {
      icon: {
        source: 'static/icon.png',
        filename: 'icon.png'
      },
      manifest: { name: SITE_INFO.sitename || process.env.npm_package_name || '', lang: process.env.lang },
      meta: {
        name: SITE_INFO.sitename || process.env.npm_package_name || '',
        lang: process.env.lang,
        ogHost: process.env.URL,
        ogImage: '/preview.jpg'
      }
    }
  }
  