How to use pako as standalone js file, not web, not a node package
cyrusadkisson opened this issue · comments
Cyrus commented
I've got pako.js (from the /dist directory) in the same directory as my program.
import * as pako from './pako.js';
...
var deflatedArray = pako.deflate(rawArray);
---------
var deflatedArray = pako.deflate(rawArray);
^
TypeError: pako.deflate is not a function
Can someone help me out. What am I doing wrong?
Vitaly Puzrin commented
check.mjs
in root with this content works as expected:
import * as pako from './dist/pako.js'
console.log(pako)
node check.mjs
Anyway, please, avoid generic programming questions.