将git信息插入到HTML中
pnpm add -D @zhangwj0520/vite-plugin
- 在
vite.config.ts
中配置
import react from '@vitejs/plugin-react'
import { createBuildInfoPlugin } from '@zhangwj0520/vite-plugin'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [react(), createBuildInfoPlugin()],
})
export default defineConfig({
plugins: [
addIconSet({
path: path.resolve(__dirname, './src/assets/icons'),
prefix: 'custom'
})
],
})