svelte.config.js 618 B

123456789101112131415161718192021222324
  1. import adapter from '@sveltejs/adapter-static';
  2. import { vitePreprocess } from '@sveltejs/kit/vite';
  3. /** @type {import('@sveltejs/kit').Config} */
  4. const config = {
  5. kit: {
  6. // 使用纯静态适配器,并配置打包文件的输入目录
  7. // Use pure static adapter and configure the input directory of the package file
  8. adapter: adapter({
  9. // may differ from host to host
  10. // 可能因主机而异
  11. fallback: 'index.html',
  12. }),
  13. },
  14. onwarn: (warning, handler) => {
  15. if (warning.code.startsWith('a11y-')) {
  16. return;
  17. }
  18. handler(warning);
  19. },
  20. preprocess: vitePreprocess(),
  21. };
  22. export default config;