aboutsummaryrefslogtreecommitdiff
path: root/packages/web-util
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web-util')
-rw-r--r--packages/web-util/src/index.build.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/web-util/src/index.build.ts b/packages/web-util/src/index.build.ts
index c0c5fc179..2260ecb9a 100644
--- a/packages/web-util/src/index.build.ts
+++ b/packages/web-util/src/index.build.ts
@@ -305,8 +305,10 @@ export function computeConfig(params: BuildParams): esbuild.BuildOptions {
/**
* Build sources for prod environment
*/
-export function build(config: BuildParams) {
- return esbuild.build(computeConfig(config));
+export async function build(config: BuildParams) {
+ const res = await esbuild.build(computeConfig(config));
+ fs.writeFileSync(`${config.destination}/version.txt`, `${_package.version}`);
+ return res;
}
const LIVE_RELOAD_SCRIPT =