-
-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathdefine.config.mjs
More file actions
23 lines (18 loc) · 921 Bytes
/
define.config.mjs
File metadata and controls
23 lines (18 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import fs from "node:fs"
import packageJson from "./package.json" with { type: "json" }
// Read CHANGELOG.md file into a string.
const changelog = fs.readFileSync("./CHANGELOG.md", "utf-8")
const jsn = (value) => JSON.stringify(value)
// Don't forget to add your added variables to vite-env.d.ts also!
// These variables are available in your Vue components and will be replaced by their values at build time.
// These will be compiled into your app. Don't store secrets here!
export const defineViteConfig = {
__VERSION__: jsn(packageJson.version),
__NAME__: jsn(packageJson.name),
__DISPLAY_NAME__: jsn(packageJson.displayName),
__CHANGELOG__: jsn(changelog),
__GITHUB_URL__: jsn(packageJson.repository.url),
__TMDB_TOKEN__: jsn(process.env.TMDB_TOKEN || ""),
// Set the HTML title for all pages from package.json so you can use %HTML_TITLE% in your HTML files.
HTML_TITLE: jsn(packageJson.displayName),
}