Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include the source in the packages #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aminya
Copy link
Contributor

@aminya aminya commented May 5, 2024

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.

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

netlify bot commented May 5, 2024

Deploy Preview for kobalte ready!

Name Link
🔨 Latest commit b96dd4d
🔍 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
Copy link
Member

jer3m01 commented May 7, 2024

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"
    }
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants