text: /* eslint-env node */
  import {join} from 'path';
  import { svelte } from '@sveltejs/vite-plugin-svelte';
  import { defineConfig } from 'vite';
  
  const PACKAGE_ROOT = __dirname;
  
  
  // https://vitejs.dev/config/
  export default defineConfig({
    mode: process.env.MODE,
    root: PACKAGE_ROOT,
    resolve: {
      alias: {
        '/@/': join(PACKAGE_ROOT, 'src') + '/',
      },
    },
    plugins: [svelte()],
    optimizeDeps: {
      exclude: ['tinro'],
    },
    base: '',
    server: {
      fs: {
        strict: true,
      },
    },
    build: {
      sourcemap: true,
      outDir: 'dist',
      assetsDir: '.',
      
      emptyOutDir: true,
      brotliSize: false,
    },
  });
  