vite-plugin-solid icon indicating copy to clipboard operation
vite-plugin-solid copied to clipboard

scope.registerDeclaration(declarationPath) error with vite-plugin-solid 2.8.2

Open floratmin opened this issue 2 years ago • 6 comments

When updating vite-plugin-solid from version 2.8.0 to version 2.8.2 when I export a component as default I get the following warning:

The exported identifier "App" is not declared in Babel's scope tracker
as a JavaScript value binding, and "@babel/plugin-transform-typescript"
never encountered it as a TypeScript type declaration.
It will be treated as a JavaScript value.
This problem is likely caused by another plugin injecting
"App" without registering it in the scope tracker. If you are the author
 of that plugin, please use "scope.registerDeclaration(declarationPath)".

floratmin avatar Jan 19 '24 09:01 floratmin

I have almost the same problem, but identifier is Input.

Problem dissapears once I roll back to 2.8.0, and appers in 2.8.1. Apparently it's because of the bump of babel packages in solid-refresh lib.

SoundOfTheSky avatar Jan 19 '24 15:01 SoundOfTheSky

If you export Input not as default it should not output this warning.

floratmin avatar Jan 19 '24 16:01 floratmin

Feels like we should move this to Solid Refresh then? @lxsmnsyc

ryansolid avatar Jan 22 '24 16:01 ryansolid

Hmmm it can go both ways @ryansolid

I really wanted the #95 soon, but I'll still check Refresh for this.

lxsmnsyc avatar Jan 22 '24 17:01 lxsmnsyc

Let us know if this still happens in ^2.9.0

lxsmnsyc avatar Jan 24 '24 05:01 lxsmnsyc

The exported identifier "Input"... fixed. Thank you, @lxsmnsyc!

SoundOfTheSky avatar Jan 24 '24 07:01 SoundOfTheSky