2023-10-08 22:38:42 +00:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
2024-05-17 06:25:55 +00:00
|
|
|
// /** @type {import('vite').Plugin} */
|
|
|
|
// const viteServerConfig = {
|
|
|
|
// name: 'log-request-middleware',
|
|
|
|
// configureServer(server) {
|
|
|
|
// server.middlewares.use((req, res, next) => {
|
|
|
|
// res.setHeader('Access-Control-Allow-Origin', '*');
|
|
|
|
// res.setHeader('Access-Control-Allow-Methods', 'GET');
|
|
|
|
// res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
|
|
|
|
// res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
|
|
|
|
// next();
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// };
|
2024-05-17 03:49:28 +00:00
|
|
|
|
2023-10-08 22:38:42 +00:00
|
|
|
export default defineConfig({
|
2024-05-17 06:25:55 +00:00
|
|
|
plugins: [sveltekit()],
|
2024-02-22 01:10:27 +00:00
|
|
|
define: {
|
|
|
|
APP_VERSION: JSON.stringify(process.env.npm_package_version)
|
2024-05-18 06:30:42 +00:00
|
|
|
},
|
2024-05-25 08:03:04 +00:00
|
|
|
build: {
|
|
|
|
sourcemap: true
|
|
|
|
},
|
2024-05-18 06:30:42 +00:00
|
|
|
worker: {
|
|
|
|
format: 'es'
|
2024-02-22 01:10:27 +00:00
|
|
|
}
|
2023-10-08 22:38:42 +00:00
|
|
|
});
|