16 lines
299 B
JavaScript
16 lines
299 B
JavaScript
import { createHtmlPlugin } from 'vite-plugin-html'
|
|
|
|
export function configHtmlPlugin(viteEnv, isBuild) {
|
|
const { VITE_TITLE } = viteEnv
|
|
|
|
const htmlPlugin = createHtmlPlugin({
|
|
minify: isBuild,
|
|
inject: {
|
|
data: {
|
|
title: VITE_TITLE,
|
|
},
|
|
},
|
|
})
|
|
return htmlPlugin
|
|
}
|