import {defineConfig} from 'vite'
import legacy from '@vitejs/plugin-legacy'
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,
    },
    plugins: [
        vue(),
        legacy({
            targets: 'chrome 49',
        }),
    ],
    server: {
        host: '0.0.0.0',
    },
    build: {
        chunkSizeWarningLimit: 1000,
    },
})
