Skip to content

JS rewriting abusively rewrite import function #255

Closed
@benoit74

Description

@benoit74

import(e) function call is abusively rewritten into ____wb_rewrite_import__("", e) instead of being kept as-is.

Found on https://activistchecklist.org/_next/static/chunks/main-151d36022e25d4e8.js

          export() {
            return {
              numItems: this.numItems,
              errorRate: this.errorRate,
              numBits: this.numBits,
              numHashes: this.numHashes,
              bitArray: this.bitArray,
            };
          }
          import(e) {
            (this.numItems = e.numItems),
              (this.errorRate = e.errorRate),
              (this.numBits = e.numBits),
              (this.numHashes = e.numHashes),
              (this.bitArray = e.bitArray);
          }
          add(e) {
            this.getHashValues(e).forEach((e) => {
              this.bitArray[e] = 1;
            });
          }

This is an issue for zimit / warc2zim only for now.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions