You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy'
|
|
|
|
import svgr from "vite-plugin-svgr"
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
//root: 'client/src',
|
|
|
|
build: {
|
|
|
|
// Relative to the root
|
|
|
|
outDir: './dist',
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
react(),
|
|
|
|
svgr({
|
|
|
|
svgrOptions: {
|
|
|
|
// svgr options
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
viteStaticCopy({
|
|
|
|
targets: [
|
|
|
|
{
|
|
|
|
src: 'node_modules/@leanprover/infoview/dist/*.production.min.js',
|
|
|
|
dest: '.'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
],
|
|
|
|
publicDir: "client/public",
|
|
|
|
server: {
|
|
|
|
port: 3000,
|
|
|
|
proxy: {
|
|
|
|
'/websocket': {
|
|
|
|
target: 'ws://localhost:8080',
|
|
|
|
ws: true
|
|
|
|
},
|
|
|
|
'/import': {
|
|
|
|
target: 'http://localhost:8080',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
path: "path-browserify",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|