omi/packages/admin/vite.config.ts

18 lines
376 B
TypeScript
Raw Normal View History

import { viteMockServe } from 'vite-plugin-mock';
import { UserConfigExport, ConfigEnv } from 'vite';
2021-07-16 14:44:18 +08:00
export default (conifg: ConfigEnv): UserConfigExport => {
return {
plugins: [
viteMockServe({
mockPath: 'mock',
2021-07-16 14:44:18 +08:00
localEnabled: conifg.command == "serve",
}),
],
esbuild: {
jsxFactory: 'h',
2021-08-07 11:04:43 +08:00
jsxFragment: 'h.f'
}
}
}