0
0
mirror of https://github.com/Maks1mS/free-ozon-dpr.git synced 2024-12-23 18:42:59 +03:00
free-ozon-dpr/vite.config.js

41 lines
735 B
JavaScript

import webfontDownload from "vite-plugin-webfont-dl";
import { VitePluginRadar } from "vite-plugin-radar";
import htmlPlugin from 'vite-plugin-html-config'
const metas = []
if (process.env.YANDEX_VERIFICATION) {
metas.push({
name: 'yandex-verification',
content: process.env.YANDEX_VERIFICATION
})
}
const PUBLIC_URL = process.env.PUBLIC_URL || process.env.VERCEL_URL
if (PUBLIC_URL) {
metas.push({
name: 'og:url',
content: 'https://' + PUBLIC_URL
})
}
export default {
root: "src",
build: {
outDir: "../dist",
},
plugins: [
webfontDownload(),
VitePluginRadar({
metrica: {
id: process.env.YANDEX_METRICA_ID,
},
}),
htmlPlugin({
metas,
},)
],
};