diff --git a/package.json b/package.json index 350b7c9..fe224fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "embroidery-viewer", "private": true, - "version": "0.0.0", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/utils/env.js b/src/utils/env.js new file mode 100644 index 0000000..9734172 --- /dev/null +++ b/src/utils/env.js @@ -0,0 +1,6 @@ +// @ts-nocheck +function appVersion() { + return APP_VERSION; +} + +export { appVersion }; diff --git a/vite.config.js b/vite.config.js index 5ac8ecf..338cb28 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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), + }, });