import { defineConfig } from "astro/config";
import scope from "astro-scope";
import wasm from "vite-plugin-wasm";
import worker from "@astropub/worker";

import purgecss from "astro-purgecss";

export default defineConfig({
  integrations: [scope(), purgecss(), worker()],
  build: {
    inlineStylesheets: "never",
  },
  vite: {
    plugins: [wasm()],
    server: {
      hmr: false,
    },
    build: {
      target: "esnext",
    },
    worker: {
      format: "es",
    },
  },
});
