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
754 B
JavaScript
Raw Normal View History

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 {
root: "src",
build: {
outDir: "../dist",
},
2024-06-05 14:56:19 +03:00
plugins: [
webfontDownload(),
VitePluginRadar({
2024-06-05 14:56:19 +03:00
metrica: {
id: process.env.YANDEX_METRICA_ID,
2024-06-05 14:56:19 +03:00
},
}),
2024-06-08 20:54:54 +03:00
htmlPlugin({
metas,
},)
2024-06-05 14:56:19 +03:00
],
};