2024-06-08 20:18:09 +03:00
|
|
|
import webfontDownload from "vite-plugin-webfont-dl";
|
|
|
|
import { VitePluginRadar } from "vite-plugin-radar";
|
2024-06-08 20:54:54 +03:00
|
|
|
import htmlPlugin from 'vite-plugin-html-config'
|
|
|
|
|
|
|
|
const metas = []
|
|
|
|
|
|
|
|
if (process.env.YANDEX_VERIFICATION) {
|
|
|
|
metas.push({
|
|
|
|
name: 'yandex-verification',
|
|
|
|
content: process.env.YANDEX_VERIFICATION
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-06-08 21:12:02 +03:00
|
|
|
const PUBLIC_URL = process.env.PUBLIC_URL || process.env.VERCEL_PROJECT_PRODUCTION_URL
|
2024-06-08 21:09:51 +03:00
|
|
|
|
|
|
|
if (PUBLIC_URL) {
|
|
|
|
metas.push({
|
|
|
|
name: 'og:url',
|
|
|
|
content: 'https://' + PUBLIC_URL
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-06-05 14:56:19 +03:00
|
|
|
|
|
|
|
export default {
|
2024-06-08 20:18:09 +03:00
|
|
|
root: "src",
|
|
|
|
build: {
|
|
|
|
outDir: "../dist",
|
|
|
|
},
|
2024-06-05 14:56:19 +03:00
|
|
|
plugins: [
|
|
|
|
webfontDownload(),
|
2024-06-08 20:18:09 +03:00
|
|
|
VitePluginRadar({
|
2024-06-05 14:56:19 +03:00
|
|
|
metrica: {
|
2024-06-08 20:18:09 +03:00
|
|
|
id: process.env.YANDEX_METRICA_ID,
|
2024-06-05 14:56:19 +03:00
|
|
|
},
|
2024-06-08 20:18:09 +03:00
|
|
|
}),
|
2024-06-08 20:54:54 +03:00
|
|
|
htmlPlugin({
|
|
|
|
metas,
|
|
|
|
},)
|
2024-06-05 14:56:19 +03:00
|
|
|
],
|
2024-06-08 20:18:09 +03:00
|
|
|
};
|