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",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"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/
|
||||
export default defineConfig({
|
||||
plugins: [svelte()],
|
||||
define: {
|
||||
APP_VERSION: JSON.stringify(process.env.npm_package_version),
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue