Skip to content

Commit

Permalink
example: Fix example on node 22 by removing json import
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Sep 21, 2024
1 parent 6b053e0 commit 3551f96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/hello-world/esbuild.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { build } from 'esbuild';
import { copyFileSync } from 'fs';
import { copyFileSync, readFileSync } from 'fs';
import { resolve, dirname } from 'path';
import { fileURLToPath } from 'url';
import AdmZip from 'adm-zip';
import metadata from './src/metadata.json' assert { type: 'json' };

const __dirname = dirname(fileURLToPath(import.meta.url));
const metadata = JSON.parse(readFileSync('./src/metadata.json', 'utf8'));

console.debug(`Building ${metadata.name} v${metadata.version}...`);

Expand Down

0 comments on commit 3551f96

Please sign in to comment.