kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.dev
MIT License
1.2k stars 61 forks source link

fix: include the source in the packages #408

Closed aminya closed 2 months ago

aminya commented 3 months ago

This has several benefits:

netlify[bot] commented 3 months ago

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

jer3m01 commented 3 months ago

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"
    }
  },
aminya commented 2 months ago

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.

jer3m01 commented 2 months ago

Thanks for the PR!