import webpack from 'webpack'

export default {
  // Enable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
  target: 'server',

  // Auto import components (https://go.nuxtjs.dev/config-components)
  components: true,

  loading: '~/components/Layout/Loading.vue',

  // Build Configuration (https://go.nuxtjs.dev/config-build)
  build: {
    extend (config, { isDev, isClient }) {
      config.node = {
        fs: 'empty'
      }
    },
    plugins: [
      new webpack.ProvidePlugin({
        _: 'lodash'
      })
    ],
    transpile: [
      'vue-tel-input-vuetify'
    ]
  },

  // Poll for hot reloading with docker
  watchers: {
    webpack: {
      aggregateTimeout: 300,
      poll: 1000
    }
  }
}
