Open bigmistqke opened 1 week ago
I did not notice the warning in development:
4:38:00 PM [vite] warning: This assignment will throw because "tabIndentation" is an import
168| _el$35.$$input = e => setValue(e.currentTarget.value);
169| var _ref$ = tabIndentation;
170| typeof _ref$ === "function" ? _$use(_ref$, _el$35) : tabIndentation = _el$35;
| ^
171| _el$35._$owner = _$getOwner();
172| _$effect(_p$ => {
Plugin: vite:esbuild
File: /Users/bigmistqke/Documents/GitHub/tm-textarea/dev/index.tsx
so I guess this is to be expected.
Describe the bug
If you run this in development mode it will run without error, but when building it we get the
Illegal reassignment of import ...
-bug. Something with the transform that it tries toref={element => binding = element}
instead of calling the function.When you alias the import it will not fail:
Your Example Website or App
https://github.com/bigmistqke/illegal-solid-bug
Steps to Reproduce the Bug or Issue
pnpm dev
-> runs perfectpnpm build
->Illegal reassignment of import "binding" in "src/index.tsx"
errorExpected behavior
I expected the binding-function to be called and the transform not try to assign to imports.
Screenshots or Videos
No response
Platform
Additional context
No response