import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'

const pathResolve = (dir) => {
  return resolve(__dirname, '.', dir)
}

const alias = {
  '@': pathResolve('src'),
}

export default defineConfig({
  resolve: {
    alias,
    extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
  },
  plugins: [vue()],
  server: {
    host: '0.0.0.0',
    port: 4000,
  },
})
