let outputDir = 'dist'
let buildTs = process.env.VUE_APP_BUILD_TS

if (buildTs) {
  buildTs = String(buildTs)
  outputDir = `dist-${buildTs}`
}

module.exports = {
  devServer: {
    port: 8000,
    host: '0.0.0.0',
    public: '0.0.0.0:8000',
    disableHostCheck: true
  },
  publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
  outputDir,
  css: {
    loaderOptions: {
      sass: {
        additionalData: `
          @import "@/styles/app.scss";
        `
      }
    }
    /*,
    configureWebpack: {
      resolve: {
        alias: {
          '@SwiperBundle': path.resolve(__dirname, './node_modules/swiper/swiper-bundle.esm.js'),
          '@SwiperBundleCss': path.resolve(__dirname, './node_modules/swiper/swiper-bundle.min.css'),
          '@Swiper': path.resolve(__dirname, './node_modules/swiper/swiper.esm.js'),
          '@SwiperVue': path.resolve(__dirname, './node_modules/swiper/vue/swiper-vue.js')
        }
      }
    } */
  }
}
