17 lines
1.5 KiB
XML
17 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project version="4">
|
|
<component name="CopilotDiffPersistence">
|
|
<option name="pendingDiffs">
|
|
<map>
|
|
<entry key="$PROJECT_DIR$/preview-gzip.js">
|
|
<value>
|
|
<PendingDiffInfo>
|
|
<option name="filePath" value="$PROJECT_DIR$/preview-gzip.js" />
|
|
<option name="updatedContent" value="import express from 'express'; import expressStaticGzip from 'express-static-gzip'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const app = express(); const port = 4173; // gzip 압축 파일을 우선적으로 제공 app.use( 	'/', 	expressStaticGzip(join(__dirname, '.svelte-kit/output/client'), { 		enableBrotli: false, 		orderPreference: ['gz'], 		serveStatic: { 			maxAge: '1d', 			setHeaders: (res, path) => { 				if (path.endsWith('.html')) { 					res.setHeader('Cache-Control', 'public, max-age=0'); 				} 			} 		} 	}) ); app.listen(port, () => { 	console.log(`\n ➜ Preview server with gzip: http://localhost:${port}/`); 	console.log(` ➜ Press Ctrl+C to stop\n`); }); " />
|
|
</PendingDiffInfo>
|
|
</value>
|
|
</entry>
|
|
</map>
|
|
</option>
|
|
</component>
|
|
</project> |