Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs(vite-legacy): Note about using regenerator-runtime in Content Security Policy environment #7234

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

svilen-ivanov
Copy link
Contributor

@svilen-ivanov svilen-ivanov commented Mar 9, 2022

Description

Can't use regenerator-runtime with CSP on old browsers (e.g. Chrome 38, IE 11). Caused by lack of globalThis and resorting to dynamic eval. Add documentation how to workaround it.

Additional context

I encounter this problem while migrating to Vite. I'd like to update the documentation for giving other users heads up. Here is the relevant regenrator-runtime fragment, and different attempt to fix it


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Can't use `regenerator-runtime` with CSP on old browsers (e.g. Chrome 38, IE 11). Caused by lack of `globalThis` and resorting to dynamic eval. Update the documentation for giving other users heads up.
@svilen-ivanov svilen-ivanov changed the title fix(documentation): Note about using regenerator-runtime in Content Security Policy environment docs(vite-legacy): Note about using regenerator-runtime in Content Security Policy environment Mar 9, 2022
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
@bluwy bluwy added the documentation Improvements or additions to documentation label Mar 10, 2022
@patak-dev patak-dev merged commit 0fd6422 into vitejs:main Mar 10, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants