svelte.config.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import adapter from '@sveltejs/adapter-static';
  2. import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
  3. /** @type {import('@sveltejs/kit').Config} */
  4. const config = {
  5. // Consult https://kit.svelte.dev/docs/integrations#preprocessors
  6. // for more information about preprocessors
  7. preprocess: vitePreprocess(),
  8. kit: {
  9. // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
  10. // If your environment is not supported or you settled on a specific environment, switch out the adapter.
  11. // See https://kit.svelte.dev/docs/adapters for more information about adapters.
  12. adapter: adapter({
  13. pages: 'build',
  14. assets: 'build',
  15. fallback: 'index.html'
  16. })
  17. },
  18. vitePlugin: {
  19. // inspector: {
  20. // toggleKeyCombo: 'meta-shift', // Key combination to open the inspector
  21. // holdMode: false, // Enable or disable hold mode
  22. // showToggleButton: 'always', // Show toggle button ('always', 'active', 'never')
  23. // toggleButtonPos: 'bottom-right' // Position of the toggle button
  24. // }
  25. },
  26. onwarn: (warning, handler) => {
  27. const { code } = warning;
  28. if (code === 'css-unused-selector') return;
  29. handler(warning);
  30. }
  31. };
  32. export default config;