Skip to content

Angular 6 support (run-time error) #74

Description

@danail-vasilev

Hello,
Is the lib supported in Angular 6 because I am observing issues ?
Steps to reproduce the issue:

  1. Use ng cli version 6.2.6 to create a new app -> ng new my-app
  2. 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):

  1. zlibjs Cannot find name 'require'.
  2. After using the import clause -> Failed to compress file: ReferenceError: process is not defined
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions