* chore: refactoring * feat: hub embeddings search benchmark * feat: flow copilot v0 * feat: as trigger schedule + refactoring * feat: improvements * fix: remove unecessary filter * feat: UX improvements * fix: frontend check * feat: switch to bun + other improvements * fix: improve reactivity
63 lines
1.3 KiB
JavaScript
63 lines
1.3 KiB
JavaScript
import { sveltekit } from '@sveltejs/kit/vite'
|
|
import { readFileSync } from 'fs'
|
|
import { fileURLToPath } from 'url'
|
|
import monacoEditorPlugin from 'vite-plugin-monaco-editor'
|
|
|
|
const file = fileURLToPath(new URL('package.json', import.meta.url))
|
|
const json = readFileSync(file, 'utf8')
|
|
const version = JSON.parse(json)
|
|
|
|
/** @type {import('vite').UserConfig} */
|
|
const config = {
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'^/api/.*': {
|
|
target: process.env.REMOTE ?? 'https://app.windmill.dev/',
|
|
changeOrigin: true,
|
|
cookieDomainRewrite: 'localhost'
|
|
},
|
|
'^/ws/.*': {
|
|
target: process.env.REMOTE_LSP ?? 'https://app.windmill.dev',
|
|
changeOrigin: true,
|
|
ws: true
|
|
},
|
|
'^/ws_mp/.*': {
|
|
target: process.env.REMOTE_MP ?? 'https://app.windmill.dev',
|
|
changeOrigin: true,
|
|
ws: true
|
|
}
|
|
}
|
|
},
|
|
preview: {
|
|
port: 3000
|
|
},
|
|
plugins: [
|
|
sveltekit(),
|
|
monacoEditorPlugin.default({
|
|
publicPath: 'workers',
|
|
languageWorkers: [],
|
|
customWorkers: [
|
|
{
|
|
label: 'graphql',
|
|
entry: 'monaco-graphql/esm/graphql.worker'
|
|
}
|
|
]
|
|
})
|
|
],
|
|
define: {
|
|
__pkg__: version
|
|
},
|
|
optimizeDeps: {
|
|
include: ['highlight.js', 'highlight.js/lib/core']
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
path: 'path-browserify'
|
|
}
|
|
},
|
|
assetsInclude: ['**/*.wasm']
|
|
}
|
|
|
|
export default config
|