35 lines
885 B
TypeScript
35 lines
885 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
import { cppPlugin } from './plugins/cpp';
|
|
import strip from '@rollup/plugin-strip';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
sveltekit(),
|
|
strip({
|
|
include: '**/*.(js|ts|svelte)',
|
|
functions: ['console.*', 'assert.*'],
|
|
}),
|
|
cppPlugin({ basePath: '', outPrefix: 'ui_' })
|
|
],
|
|
build: {
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: () => 'index'
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/json': 'http://192.168.129.178',
|
|
'/wifi': 'http://192.168.129.178',
|
|
'/restart': 'http://192.168.129.178',
|
|
'/ws': {
|
|
target: 'ws://192.168.129.178',
|
|
ws: true,
|
|
}
|
|
}
|
|
}
|
|
});
|