0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00
astro/packages/renderers/renderer-svelte/index.js
2022-03-04 17:20:00 +00:00

24 lines
557 B
JavaScript

import { svelte } from '@sveltejs/vite-plugin-svelte';
export default {
name: '@astrojs/renderer-svelte',
client: './client.js',
server: './server.js',
viteConfig({ mode }) {
return {
optimizeDeps: {
include: ['@astrojs/renderer-svelte/client.js', 'svelte', 'svelte/internal'],
exclude: ['@astrojs/renderer-svelte/server.js'],
},
plugins: [
svelte({
emitCss: true,
compilerOptions: { dev: mode === 'development', hydratable: true },
experimental: {
useVitePreprocess: true,
},
}),
],
};
},
};