We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b053e0 commit 3551f96Copy full SHA for 3551f96
examples/hello-world/esbuild.js
@@ -1,11 +1,11 @@
1
import { build } from 'esbuild';
2
-import { copyFileSync } from 'fs';
+import { copyFileSync, readFileSync } from 'fs';
3
import { resolve, dirname } from 'path';
4
import { fileURLToPath } from 'url';
5
import AdmZip from 'adm-zip';
6
-import metadata from './src/metadata.json' assert { type: 'json' };
7
8
const __dirname = dirname(fileURLToPath(import.meta.url));
+const metadata = JSON.parse(readFileSync('./src/metadata.json', 'utf8'));
9
10
console.debug(`Building ${metadata.name} v${metadata.version}...`);
11
0 commit comments