viridia / dolmen Goto Github PK
View Code? Open in Web Editor NEWUI component library for Solid.js with SSR support
License: MIT License
UI component library for Solid.js with SSR support
License: MIT License
The goal of the project is to produce a UI widget set that works well with Solid.js and SSR.
Currently I am using vanilla-extract to generate CSS resources from TypeScript at build time. There is a small amount of runtime for generating class name lists, but this is SSR-compatible.
Vanilla-extract requires a bundler - it will work with esbuild, Vite, Webpack, rollup, and some others. This means that in a production app, the library gets bundled twice: once at the library level, and once at the application level.
In order to work with Solid SSR, the library needs to provide something close to the original source, with the JSX tags preserved. However, at minimum the files in dist/
should be run through tsc
, because the application may have a tsconfig.json
with different compiler options. (Most tsconfig options don't affect how the code is written, but some - like isolateModules
- can have an impact on how the code is written.)
Other than stripping type annotations and resolving stylesheet import references, the bundler at this level should do as little as possible.
Here is a list of the various possible bundling options:
As you can see, none of these options currently work.
The most obvious approach is to abandon using vanilla-extract and re-write all of the stylesheets in SASS, possibly using CSS modules. However, in doing so I lost a lot of the benefits of vanilla-extract - type safety for CSS classes, dead code discovery, and so on.
In this case, I would probably then use plain tsc
for generating the dist folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.