import adapter from "@sveltejs/adapter-node"
import preprocess from "svelte-preprocess"

/** @type {import('@sveltejs/kit').Config} */
const config = {
  package: {
    exports: (filePath) => {
      return !filePath.startsWith("scripts/") && !filePath.startsWith("server/")
    },
    files: (filePath) => {
      return !filePath.startsWith("scripts/") && !filePath.startsWith("server/")
    },
  },

  // Consult https://github.com/sveltejs/svelte-preprocess
  // for more information about preprocessors
  preprocess: [
    preprocess({
      postcss: true,
    }),
  ],

  kit: {
    adapter: adapter({
      precompress: true,
    }),
  },
}

export default config