Proxied Functions Do Not Handle Spreading
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- build-system, tooling
调研方向
从最小复现开始,比较源函数位于 .jsx 文件与 .js 文件中时的处理方式。跟踪 plugin 对 spread 语法的处理,并通过运行复现来验证修复:无论使用哪种扩展名,GlobalTest(1,2,3) 都应保留并记录全部三个参数。
由索引模型根据 Issue 内容生成。
描述
The Spreading syntax does not work the same way as it does in normal javascript. The spreading (...) syntax of an array into a function gives the wrong value. When imported from a .js file, the function behaves as expected, however when imported from a .jsx file, the function only puts the first value of the array into a new array.
How To Reproduce
-> Create a new vanilla Solid-js application.
-> Create a new jsx file, and make a function that uses the spread
-> call the spreaded function from any other file I.E(the default app)
-> Changing the file extension back to js, changes the behavior.
Minimum Reproduction
//In a File, the source function
function GlobalTest(...arr){
console.log(...arr);
}
//Inside of app.jsx
import {GlobalTest} from 'otherfile'
GlobalTest(1,2,3); // should see a '1' in the log when the source function is in a .jsx
GlobalTest(1,2,3); // should see a '1 2 3' in the log when the source function is in a .js
- 主要语言
- TypeScript
- 星标
- 522
- 派生
- 72
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 38
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs/solid-vite-plugin 的其他 Issue
-
Test environment detection doesn't consider Vitest workspaces可能已有人在做 @carloitaben 于 49 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
solidjs/solid-vite-plugin#205 · 1 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
solidjs/solid-vite-plugin#369 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
solidjs/solid-vite-plugin#328 ·
维护者通常 1 天内回复
-
Retain $ServerOnly templates while HMR is active可能已有人在做 @brenelz 于 22 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
solidjs/solid-vite-plugin#308 ·
维护者通常 1 天内回复
-
jsx: 'preserve' in optimizeDeps breaks dependency scan when .tsx files use `import.meta.glob`可能已有人在做 @brenelz 于 22 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 72/100
solidjs/solid-vite-plugin#262 · 2 条评论 ·
维护者通常 1 天内回复
查看 solidjs/solid-vite-plugin 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
supadata-ai/mcp#27 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
capricorn86/happy-dom#2485 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
siyuan-note/siyuan#20430 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Albert-Weasker/niubigeo#194 ·
维护者通常 1 天内回复