You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
winteroo
changed the title
配置@vitejs/plugin-legacy的renderModernChunks选项为false时,无法打包出workers相关的文件
[plugin-legacy]-配置@vitejs/plugin-legacy的renderModernChunks选项为false时,无法打包出workers相关的文件
May 10, 2024
Describe the bug
我在vite工程中使用workers做复杂计算,在开发环境下是可以正常运行的,但是当我执行打包后,workers无法运行,经过查看打包后的文件,发现缺少了workers打包文件。
打包的文件中,可以找到引入workers的代码:(此时@vitejs/plugin-legacy插件的renderModernChunks为false)
但是在dist文件夹下却没有该文件:
我尝试将@vitejs/plugin-legacy插件中的renderModernChunks设置为true,生成支持现代浏览器的文件,发现打包后是可以正常运行的,且存在该workers文件。
故我猜测是@vitejs/plugin-legacy插件的renderModernChunks配置项影响了workers的打包
Reproduction
https://stackblitz.com/edit/vitejs-vite-fzyjtb?file=worker.js
Steps to reproduce
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: