Skip to content

[Feature Request]: Enable preserveSource option of rollup-plugin-web-worker-loader #1308

@KentoMoriwaki

Description

@KentoMoriwaki

Preflight Checklist

  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

What package is this feature request for?

rrweb

Problem Description

I am developing a Chrome Extension using rrweb (2.0.0-alpha.4), but it has been rejected during the review process for the following reason:

Chrome Web Store Policy - Obfuscation

The following are some examples of violations of this type of policy:

  • Base 64 encoding (e.g. 'SSdtIGluIHVyIGJhc2U=')

Upon investigation, I found that the base64 encoded worker code, generated as a result of using rollup-plugin-web-worker-loader within rrweb, was the cause of the rejection.

Proposed Solution

By using the setting preserveSource: true here, it’s possible to create a worker without having to rely on base64 encoding. Unless there is a specific reason not to, I would like to propose setting this option to true by default to avoid similar issues in the future.

Alternatives Considered

If it is not possible to change preserveSource for some reasons, I suggest considering outputting the worker as a separate file.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions