const { defineConfig } = require('@vue/cli-service')
const proxy = require('./config/proxy.ts')
const path = require('path')
const { resolve } = require('path')

module.exports = defineConfig({
  // publicPath: '',
  transpileDependencies: true,
  devServer: {
    proxy: proxy.dev
  },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      patterns: [
        path.resolve(__dirname, '@/src/styes/*.less')
      ]
    }
  },
  chainWebpack: config => {
    config.resolve.alias.set('ThingsUi', resolve(__dirname, '/'))
  },
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          javascriptEnabled: true
        }
      }
    }
  }
})
