forked from imbytecat/fullstack-starter
- 添加 Tauri 开发和构建脚本,优化开发流程并分离 Vite 与 Tauri 的启动命令。 - 配置开发和构建命令,指定使用 Bun 运行开发与构建脚本,并设置开发服务器地址。 - 配置开发服务器端口为3000并强制使用该端口,同时忽略src-tauri目录的文件监听。
34 lines
775 B
TypeScript
34 lines
775 B
TypeScript
import tailwindcss from '@tailwindcss/vite'
|
|
import { devtools as tanstackDevtools } from '@tanstack/devtools-vite'
|
|
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { nitro } from 'nitro/vite'
|
|
import { defineConfig } from 'vite'
|
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
|
|
export default defineConfig({
|
|
clearScreen: false,
|
|
plugins: [
|
|
tanstackDevtools(),
|
|
nitro({
|
|
preset: 'bun',
|
|
serveStatic: 'inline',
|
|
}),
|
|
tsconfigPaths(),
|
|
tailwindcss(),
|
|
tanstackStart(),
|
|
react({
|
|
babel: {
|
|
plugins: ['babel-plugin-react-compiler'],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
port: 3000,
|
|
strictPort: true,
|
|
watch: {
|
|
ignored: ['**/src-tauri/**'],
|
|
},
|
|
},
|
|
})
|