Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit efd2e50

Browse files
committed
fix: a416d24 not defined issue
1 parent a416d24 commit efd2e50

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

vite.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import ChildProcess from 'child_process';
1313

1414
// const production = process.env.NODE_ENV === 'production';
1515

16-
const appVersion = JSON.stringify(process.env.npm_package_version);
16+
const appVersion = process.env.npm_package_version;
1717
const commitHash = ChildProcess.execSync('git rev-parse --short HEAD').toString();
1818

19+
console.log(`Building CrossSync version: v${appVersion} #${commitHash}`);
20+
1921
export default defineConfig({
2022
build: {
2123
rollupOptions: {
@@ -59,7 +61,7 @@ export default defineConfig({
5961
}),
6062
],
6163
define: {
62-
__APP_VERSION__: appVersion,
63-
__COMMIT_HASH__: commitHash,
64+
__APP_VERSION__: JSON.stringify(appVersion),
65+
__COMMIT_HASH__: JSON.stringify(commitHash),
6466
},
6567
});

0 commit comments

Comments
 (0)