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

Unable to package normal files in web worker #19073

Open
7 tasks done
just-ads opened this issue Dec 25, 2024 · 0 comments · May be fixed by #19079
Open
7 tasks done

Unable to package normal files in web worker #19073

just-ads opened this issue Dec 25, 2024 · 0 comments · May be fixed by #19079
Labels
feat: web workers p3-minor-bug An edge case that only affects very specific usage (priority) plugin: legacy

Comments

@just-ads
Copy link

just-ads commented Dec 25, 2024

Describe the bug

The generated worker file contains es syntax
export function __vite_legacy_guard()
image
Cannot be used normally in worker

Reproduction

https://stackblitz.com/edit/vitejs-vite-ixsfq5p1?file=main.js

Steps to reproduce

1.npm install
2.npm run build

System Info

System:
    OS: Windows 10 10.0.19042
    CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
    Memory: 3.29 GB / 15.95 GB
  Binaries:
    Node: 20.11.0 - E:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - E:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (127.0.2651.74)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitejs/plugin-legacy: ^6.0.0 => 6.0.0 
    @vitejs/plugin-react: ^4.3.4 => 4.3.4 
    vite: ^6.0.3 => 6.0.3

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red sapphi-red added plugin: legacy p3-minor-bug An edge case that only affects very specific usage (priority) feat: web workers labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: web workers p3-minor-bug An edge case that only affects very specific usage (priority) plugin: legacy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants