Skip to content

Conversation

@adaam2
Copy link
Member

@adaam2 adaam2 commented Nov 20, 2025

No description provided.

BREAKING CHANGE: Package now distributes as pure TypeScript instead of compiled JavaScript. Consumers using Vite will need to configure the @ alias in their vite.config to resolve imports from the library.

- Updated package.json entry points to point to src/index.ts
- Removed build process for library distribution
- Simplified vite.config.mts (removed library build config)
- Updated moonshine.css export to point to source CSS
- Removed dist from files array
@adaam2 adaam2 changed the title v2.0.0(alpha): distribute moonshine as pure ts feat: v2.0.0(alpha): distribute moonshine as pure ts Nov 20, 2025
{
"name": "@speakeasy-api/moonshine",
"version": "1.9.1",
"packageManager": "pnpm@9.0.0",
Copy link
Contributor

@qstearns qstearns Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything stopping us from setting "type": "module" in here at this point? Seems like all consumers should be ESM and might as well behavior inside the package be consistent

"module": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we nuke CJS exports and just have ".": "./src/index.ts"? Seems like we shouldn't need the special casing anymore

"./moonshine.css": {
"require": "./dist/style.css",
"import": "./dist/style.css"
"require": "./src/global.css",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does redirecting ./moonshine.css to the unbuilt artifact end up working in practice?

I would have expected us to need to add another tailwind config export to make this work. Or maybe add an @config directive to this file?

@@ -1,2 +1,2 @@
{
"compilerOptions": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just set noEmit in here directly to avoid accidental npm tsc nonsense?

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.

3 participants