mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
35 lines
760 B
TypeScript
Executable file
35 lines
760 B
TypeScript
Executable file
import path from 'path';
|
|
import checker from 'vite-plugin-checker';
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
const PORT = 3039;
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
checker({
|
|
typescript: true,
|
|
overlay: {
|
|
position: 'tl',
|
|
initialIsOpen: false,
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: /^~(.+)/,
|
|
replacement: path.join(process.cwd(), 'node_modules/$1'),
|
|
},
|
|
{
|
|
find: /^src(.+)/,
|
|
replacement: path.join(process.cwd(), 'src/$1'),
|
|
},
|
|
],
|
|
},
|
|
server: { port: PORT, host: true },
|
|
preview: { port: PORT, host: true },
|
|
});
|