Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Minifier removes CSP hashes from @vite/plugin-legacy #18

Closed
reynotekoppele opened this issue Nov 6, 2021 · 1 comment
Closed

Minifier removes CSP hashes from @vite/plugin-legacy #18

reynotekoppele opened this issue Nov 6, 2021 · 1 comment

Comments

@reynotekoppele
Copy link

reynotekoppele commented Nov 6, 2021

By adding enabling the minifier the CSP hashes set by @vite/plugin-legacy are being removed.

Issue seems te go away by setting minifyJS to false, though this results in hydration issues as far as I've tested.

Repo with issue can be found at Git Repo. Is a clone of Playground SSR Vue with slight changes to show the issue.

Headers are added in server.js via Helmet.

To reproduce:

  1. Download repo
  2. Run npm install
  3. Run npm run build
  4. Run npm run serve -> See console for issue
  5. Change minifyJs: true to minifyJs: false in vite.config.js
  6. Repeat step 3 and 4
@anncwb
Copy link
Collaborator

anncwb commented Dec 27, 2021

closed c77a0b8

@anncwb anncwb closed this as completed Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants