import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue'
import hooks from '@midwayjs/vite-plugin-hooks';

const {resolve} = require('path')

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [hooks(), vue()],
    resolve: {
        alias: {
            '@': resolve(__dirname, 'src'),
            'controller': resolve(__dirname, 'src/apis/controller'),
            'service': resolve(__dirname, 'src/apis/service'),
            'utils': resolve(__dirname, 'src/utils')
        }
    },
    css: {
        preprocessorOptions: {
            scss: {
                additionalData: `
                @import "@/styles/_variables.scss";
                @import "@/styles/_mixin.scss";
                `
            }
        }
    }
});
