Hello,
Is the lib supported in Angular 6 because I am observing issues ?
Steps to reproduce the issue:
- Use ng cli version 6.2.6 to create a new app -> ng new my-app
- Import the lib like that:
package.json:
...
"@angular/common": "6.1.10",
...
"@angular/cli": "6.2.6",
"zlibjs": "0.3.1"
...
mycomponent.ts:
//var zlib = require("zlibjs");
import * as zlib from "zlibjs";
zlib.deflate(text, cb);
Actual behavior (issues):
- zlibjs Cannot find name 'require'.
- After using the import clause -> Failed to compress file: ReferenceError: process is not defined
- After setting (window as any).process = { env: { DEBUG: undefined }, }; in polyfills.ts -> process.nextTick is not a function
p.s. I use pako for the deflation without any issues, however, the above is still valid for this lib.
Hello,
Is the lib supported in Angular 6 because I am observing issues ?
Steps to reproduce the issue:
package.json:
...
"@angular/common": "6.1.10",
...
"@angular/cli": "6.2.6",
"zlibjs": "0.3.1"
...
mycomponent.ts:
//var zlib = require("zlibjs");
import * as zlib from "zlibjs";
zlib.deflate(text, cb);
Actual behavior (issues):
p.s. I use pako for the deflation without any issues, however, the above is still valid for this lib.