import * as fs from 'node:fs'
import { resolve } from 'node:path'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    https: {
      cert: fs.readFileSync('/Users/nvkrug/Work/localhost.pem'),
      key: fs.readFileSync('/Users/nvkrug/Work/localhost-key.pem'),
    },
  },
  resolve: {
    alias: [
      { find: '@', replacement: resolve(__dirname, './src') },
      { find: '@mts-icons', replacement: resolve(__dirname, './node_modules/@mts-ds/icons/web2') },
    ],
  },
})
