nodeca / pako

high speed zlib port to javascript, works in browser & node.js

Home Page:http://nodeca.github.io/pako/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use pako as standalone js file, not web, not a node package

cyrusadkisson opened this issue · comments

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?

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.