33 lines
789 B
TypeScript
33 lines
789 B
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
import viteCompression from 'vite-plugin-compression';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
sveltekit(),
|
|
viteCompression({
|
|
verbose: true, // 압축 결과를 콘솔에 출력
|
|
disable: false,
|
|
threshold: 1024, // 1KB 이상 파일만 압축
|
|
algorithm: 'gzip', // gzip 알고리즘 사용
|
|
ext: '.gz', // .gz 확장자로 파일 생성
|
|
deleteOriginFile: false // 원본 파일 유지
|
|
})
|
|
],
|
|
preview: {
|
|
headers: {
|
|
'Cache-Control': 'public, max-age=600'
|
|
},
|
|
// preview 서버에서 gzip 파일을 제공하도록 설정
|
|
proxy: {}
|
|
},
|
|
server: {
|
|
// 개발 서버 설정
|
|
fs: {
|
|
strict: false
|
|
}
|
|
}
|
|
});
|