Proxied Functions Do Not Handle Spreading
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- build-system, tooling
Research direction
Start with the minimal reproduction, comparing how the source function is processed when it is in a .jsx file versus a .js file. Trace the plugin's handling of the spread syntax and verify the fix by running the reproduction: GlobalTest(1,2,3) should preserve and log all three arguments from either extension.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 520
- Forks
- 70
- Avg merge
- 23h 35m
- Merged PRs (30d)
- 39
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid-vite-plugin
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solidjs/solid-vite-plugin#205 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
solidjs/solid-vite-plugin#369 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
solidjs/solid-vite-plugin#328 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
solidjs/solid-vite-plugin#308 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
solidjs/solid-vite-plugin#262 · 2 comments ·
All issues in solidjs/solid-vite-plugin
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100