svelte.config.js 694 B

123456789101112131415161718192021222324252627
  1. // Copyright 2019-2024 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. import autoAdapter from '@sveltejs/adapter-auto'
  5. import staticAdapter from '@sveltejs/adapter-static'
  6. import preprocess from 'svelte-preprocess'
  7. const TARGET = process.env.TARGET
  8. /** @type {import('@sveltejs/kit').Config} */
  9. const config = {
  10. // Consult https://github.com/sveltejs/svelte-preprocess
  11. // for more information about preprocessors
  12. preprocess: preprocess(),
  13. kit: {
  14. adapter:
  15. TARGET === 'tauri'
  16. ? staticAdapter({
  17. fallback: 'index.html'
  18. })
  19. : autoAdapter()
  20. }
  21. }
  22. export default config