import { resolve } from 'path';
import { defineConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import { normalizePath } from 'vite';

export default defineConfig({
  plugins: [
    viteStaticCopy({
      targets: [
        {
          src: normalizePath(resolve(__dirname, './node_modules/@polygon-streaming/web-player-babylonjs/dist/service-worker.js')),
          dest: ''
        }
      ]
    })
  ],
  server: {
    open: '/',
    port: 8080
  }
});