From 6e723aadf6de45a79b4ef64d288ea275628232c5 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 15 Dec 2022 14:59:56 -0600 Subject: start updating to sveltekit v1 --- vite.config.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vite.config.js (limited to 'vite.config.js') diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..76377b1 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,28 @@ +import { sveltekit } from '@sveltejs/kit/vite' + +/** @type {import('vite').UserConfig} */ +const config = { + plugins: [sveltekit()], + build: { + rollupOptions: { + output: { + manualChunks: undefined, + }, + }, + }, + // if the user is on replit or gitpod, use a secure websocket + server: + process.env.REPL_ID || process.env.GITPOD_WORKSPACE_ID + ? { + hmr: process.env.GITPOD_WORKSPACE_URL + ? { + host: process.env.GITPOD_WORKSPACE_URL.replace('https://', '3000-'), + protocol: "wss", + clientPort: 443 + } + : true + } + : {}, +} + +export default config \ No newline at end of file -- cgit