Skip to content

Production output contains Function constructor #658

@t-miller

Description

@t-miller

Describe the bug
After running yarn build, the generated files still contain the Function() constructor. Upon trying to upload an extension to the Firefox store, the linter states The Function constructor is eval. in both content-script.js and background.js. I have kept the OOTB vue.config.js and babel.config.js.

To Reproduce
Steps to reproduce the behavior:

  1. Fix background.js to point to js/content-script.js
  2. Run yarn build

Expected behavior
The output files to be free of eval() and Function() to comply with Mozilla's CSP.

Desktop (please complete the following information):

  • vue-web-extension version: 2.0.0
  • OS: Windows 10 Pro - 19042.746
  • Node.js version: 14.15.4

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