Files
integration/packages/widgets/vite.config.ts

19 lines
407 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
export default defineConfig({
server: {
proxy: {
'^/widgets/dist/(.+)\\.js$': {
target: 'http://localhost:8931',
rewrite: (path) => {
const match = path.match(/^\/widgets\/dist\/(.+)\.js$/)
if (match) {
return `/src/widgets/${match[1]}/main.ts`
}
return path
}
}
}
}
})