Duplicates
Latest version
Current behavior 😯
Right now, solid-start in dev mode transforms function statements to var statements, without considering function hoisting. This can break code, as can be seen in the reproduction steps.
Expected behavior 🤔
Valid javascript code should still run in dev mode
Steps to reproduce 🕹
Steps:
- Clone https://github.com/danieltroger/solid-start-hoisting-issue
yarn dev
- visit localhost:3000
- observer error in dev console
Context 🔦
I prefer having the exported thing at the top of modules. Like in the attached example I have a case where I want to add a symbol to a function, however I have to do it in an IIFE in the export so that I can add a pure comment and the module still can be tree-shaken.
Your environment 🌎
M1 Max 16" MBP, node v21.5.0 on macOS 14.2.1 (23C71)
Duplicates
Latest version
Current behavior 😯
Right now, solid-start in dev mode transforms function statements to
varstatements, without considering function hoisting. This can break code, as can be seen in the reproduction steps.Expected behavior 🤔
Valid javascript code should still run in dev mode
Steps to reproduce 🕹
Steps:
yarn devContext 🔦
I prefer having the exported thing at the top of modules. Like in the attached example I have a case where I want to add a symbol to a function, however I have to do it in an IIFE in the export so that I can add a pure comment and the module still can be tree-shaken.
Your environment 🌎
M1 Max 16" MBP, node v21.5.0 on macOS 14.2.1 (23C71)