Skip to content

Commit

Permalink
fix: fixed wasm path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-perri committed May 8, 2024
1 parent 256b955 commit ef03828
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/initializeImageMagick.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';

import { initializeImageMagick as baseInitializeImageMagick } from '@imagemagick/magick-wasm';

export default async function initializeImageMagick(): Promise<void> {
const wasmBytes = readFileSync(
resolve('node_modules/@imagemagick/magick-wasm/dist/magick.wasm'),
require.resolve('@imagemagick/magick-wasm/magick.wasm'),
);
await baseInitializeImageMagick(wasmBytes);
}

0 comments on commit ef03828

Please sign in to comment.