Skip to content

@vitejs/plugin-legacy CSP for blankDynamicImport does not work #4568

@tjk

Description

@tjk

Describe the bug

This code is rendered as part of a chunk rather than a standalone script tag so the sha CSP does not work for it.

Reproduction

Can supply if not obvious.

System Info

System:
    OS: Linux 5.10 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900KF @ 3.50GHz
    Memory: 6.01 GB / 12.38 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 14.17.0 - ~/.asdf/installs/nodejs/14.17.0/bin/node
    Yarn: 1.22.5 - ~/.asdf/shims/yarn
    npm: 6.14.13 - ~/.asdf/installs/nodejs/14.17.0/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^1.4.0 => 1.4.0
    vite: ^2.5.0-beta.2 => 2.5.0-beta.2

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-minor-bugAn edge case that only affects very specific usage (priority)plugin: legacy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions