diff options
| author | Zach Sais <[email protected]> | 2025-06-16 01:13:39 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-16 06:13:39 +0000 |
| commit | cc7459e40388c8ede6a16277be94ea89e4fbfc6e (patch) | |
| tree | a1259d6f933a897378a217b43a5b2077865a1148 /esbuild.config.js | |
| parent | 40fbb61a1ba3b0b16c0695c845d986b15768e0af (diff) | |
fix version release for Dockerfile build (#1080)
Diffstat (limited to 'esbuild.config.js')
| -rw-r--r-- | esbuild.config.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/esbuild.config.js b/esbuild.config.js index a4ddd7dc..846fb684 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -5,9 +5,14 @@ */ import esbuild from 'esbuild'; -import { readFileSync } from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { createRequire } from 'module'; -const pkg = JSON.parse(readFileSync('./package.json', 'utf-8')); +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const require = createRequire(import.meta.url); +const pkg = require(path.resolve(__dirname, 'package.json')); esbuild .build({ |
