kobalte
kobalte copied to clipboard
fix: include the source in the packages
This has several benefits:
- Allows directly importing the source files, that could resolve the issues with server-side rendering with various build systems
- Can result in more optimized code as the source file is directly built by the build tool (better tree shaking or more modern syntax)
- Compatibility with new package registries such as JSR that prefer TypeScript over JavaScript
- In security conscious environments, the source files can be checked against GitHub and then used directly.
Deploy Preview for kobalte ready!
| Name | Link |
|---|---|
| Latest commit | b96dd4db0d0e925abaddf7c8b3b3b9d57ed32b6f |
| Latest deploy log | https://app.netlify.com/sites/kobalte/deploys/663722dd2f482c0008055fd0 |
| Deploy Preview | https://deploy-preview-408--kobalte.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I'm not super familiar with source exports, but for @kobalte/core would this be more optimized to avoid barrel files (which will be removed at some point) in favor of separated exports:
"exports": {
".": {
"types": "./dist/index.d.ts",
"solid": "./dist/index.jsx",
"default": "./dist/index.js"
},
"./*": {
"types": "./dist/*/index.d.ts",
"solid": "./dist/*/index.jsx",
+ "source": "./src/*/index.tsx", // or "source": "./src/*" ?
"default": "./dist/*/index.js"
}
},
The import map change allows importing the source files. The top-level source entry is for some bundlers like Parcel that prefer the source files over the built files.
Thanks for the PR!