0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/renderers/renderer-svelte/index.js
Ben Holmes 79282163e2
fix: Svelte PostCSS config error (#2807)
* fix: Svelte PostCSS config error

* chore: changeset
2022-03-15 19:32:39 -04:00

31 lines
732 B
JavaScript

import { svelte } from '@sveltejs/vite-plugin-svelte';
import preprocess from 'svelte-preprocess';
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 },
preprocess: [
preprocess({
less: true,
sass: { renderSync: true },
scss: { renderSync: true },
stylus: true,
typescript: true,
}),
],
}),
],
};
},
};