Add app version provider
This commit is contained in:
parent
d9a1d623df
commit
5f3d8314f9
3 changed files with 10 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "embroidery-viewer",
|
"name": "embroidery-viewer",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "1.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
6
src/utils/env.js
Normal file
6
src/utils/env.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
function appVersion() {
|
||||||
|
return APP_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { appVersion };
|
|
@ -4,4 +4,7 @@ import { svelte } from "@sveltejs/vite-plugin-svelte";
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [svelte()],
|
plugins: [svelte()],
|
||||||
|
define: {
|
||||||
|
APP_VERSION: JSON.stringify(process.env.npm_package_version),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue