Ctrl K
ComunidadGuías…

frontend/svelte.config.js

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { markdownPlugin } from '@hyvor/design/dev';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://svelte.dev/docs/kit/integrations
	// for more information about preprocessors
	extensions: ['.svelte', '.md'],
	preprocess: [markdownPlugin(), vitePreprocess()],

	kit: {
		// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
		// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
		// See https://svelte.dev/docs/kit/adapters for more information about adapters.
		adapter: adapter({
			fallback: 'fallback.html'
		}),

		prerender: {
			// TODO: Remove this when going production
			handleHttpError: 'warn',
			handleMissingId: 'warn',

			entries: ['*']
		},

		alias: {
			// docs are kept in the repo root, and synced to hyvor/core
			$docs: '../docs'
		},

		typescript: {
			config(config) {
				// ../docs has no node_modules, resolve its types from here
				config.compilerOptions.paths['@hyvor/design/marketing'] = [
					'../node_modules/@hyvor/design/dist/marketing/index.d.ts'
				];
				config.include.push('../../docs/**/*.ts');
			}
		}
	},

	compilerOptions: {
		experimental: {
			async: true
		}
	}
};

export default config;