Skip to content

Commit

Permalink
feat: proxying to local bundle server in dev (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdabbs authored Dec 29, 2023
1 parent 804540d commit 8717bef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/viewer/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vitest/config'

const compileServer = process.env.COMPILE_SERVER_URL || 'http://localhost:3141'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [sveltekit()],
server: {
proxy: {
'/bundle': {
target: compileServer,
rewrite: path => path.replace(/^\/bundle/, ''),
},
},
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
coverage: {
Expand Down

0 comments on commit 8717bef

Please sign in to comment.