svelte.config.js 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. import { mdsvex } from "mdsvex";
  2. import adapter from "@sveltejs/adapter-static";
  3. import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
  4. /** @type {import('@sveltejs/kit').Config} */
  5. const config = {
  6. // Consult https://svelte.dev/docs/kit/integrations
  7. // for more information about preprocessors
  8. preprocess: [vitePreprocess(), mdsvex()],
  9. kit: {
  10. // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
  11. // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
  12. // See https://svelte.dev/docs/kit/adapters for more information about adapters.
  13. adapter: adapter({
  14. // default options are shown. On some platforms
  15. // these options are set automatically — see below
  16. pages: "build",
  17. assets: "build",
  18. fallback: "404.html",
  19. precompress: false,
  20. strict: true,
  21. }),
  22. paths: {
  23. base: process.argv.includes("dev") ? "" : process.env.BASE_PATH,
  24. },
  25. },
  26. extensions: [".svelte", ".svx"],
  27. };
  28. export default config;