Commit 6251bba9 authored by Kasper Seweryn's avatar Kasper Seweryn 🥞
Browse files

Fix vite.config.ts

parent de4bf0a5
Pipeline #21380 passed with stage
in 1 minute and 1 second
import { defineConfig } from 'vite'
import { defineConfig, HmrOptions } from 'vite'
import { createVuePlugin as Vue2 } from 'vite-plugin-vue2'
import ScriptSetup from 'unplugin-vue2-script-setup/vite'
import { VitePWA } from 'vite-plugin-pwa'
import { resolve } from 'path'
const port = process.env.VUE_PORT ?? 8080
const port = +(process.env.VUE_PORT ?? 8080)
const hmr = {
port: process.env.HMR_PORT || (process.env.FUNKWHALE_PROTOCOL === 'https' ? 443 : port),
protocol: process.env.HMR_PROTOCOL || (process.env.FUNKWHALE_PROTOCOL === 'https' ? 'wss' : 'ws')
}
} as HmrOptions
if (process.env.GITPOD_WORKSPACE_URL) {
hmr.host = process.env.GITPOD_WORKSPACE_URL.replace('https://', `${process.env.HMR_PORT ?? process.env.VUE_PORT ?? 4000}-`)
......@@ -57,8 +57,8 @@ export default defineConfig(() => ({
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, './index.html'),
embed: path.resolve(__dirname, './embed.html')
main: resolve(__dirname, './index.html'),
embed: resolve(__dirname, './embed.html')
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment