Solid.js reactivity patterns for classes, and class components. See https://github.com/lume/element for a Custom Element system built with classy-solid.
MIT License
52
stars
2
forks
source link
Document steps needed to use decorators with vite #2
I think many use Vite with Solid, but I noticed there aren't any instructions on using classy-solid with Vite. Using the example car class from the readme will cause errors with Vite if it's not configured to use decorators (Support for the experimental syntax 'decorators' isn't currently enabled).
To do so, one can install @babel/plugin-proposal-class-properties, and @babel/plugin-proposal-decorators. Then update their vite.config.ts file to include:
I think many use Vite with Solid, but I noticed there aren't any instructions on using classy-solid with Vite. Using the example car class from the readme will cause errors with Vite if it's not configured to use decorators (
Support for the experimental syntax 'decorators' isn't currently enabled
).To do so, one can install
@babel/plugin-proposal-class-properties
, and@babel/plugin-proposal-decorators
. Then update theirvite.config.ts
file to include:I think it would be beneficial to add this or similar instructions to the readme.