evanwashere / wasm

fast wasm modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help

ThatGuyJamal opened this issue · comments

import {decompress_with as decompressWith } from "@evan/wasm"

decompressWith.compress(new Uint8Array(100))

I'm trying to use this in a normal node.js typescript file. hows the best path for me?

commented

you need to use full path

for example

// @ts-ignore
const { decompress_with } = require('@evan/wasm/target/zlib/node.cjs');

// or
// @ts-ignore
import { decompress_with } from '@evan/wasm/target/zlib/node.cjs';


// if esm
// @ts-ignore
import { decompress_with } from '@evan/wasm/target/zlib/node.mjs';