Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.

feat: v2.0.0(alpha): distribute moonshine as pure ts - #324

Closed
adaam2 wants to merge 8 commits into
mainfrom
alpha
Closed

feat: v2.0.0(alpha): distribute moonshine as pure ts#324
adaam2 wants to merge 8 commits into
mainfrom
alpha

Conversation

@adaam2

@adaam2 adaam2 commented Nov 20, 2025

Copy link
Copy Markdown
Member

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
Comment thread package.json
@@ -4,18 +4,19 @@
"packageManager": "pnpm@9.0.0",

@qstearns qstearns Nov 21, 2025

Copy link
Copy Markdown
Collaborator

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

Comment thread package.json
"module": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": {

Copy link
Copy Markdown
Collaborator

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

Comment thread package.json
"./moonshine.css": {
"require": "./dist/style.css",
"import": "./dist/style.css"
"require": "./src/global.css",

Copy link
Copy Markdown
Collaborator

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?

Comment thread tsconfig.json
@@ -1,2 +1,2 @@
{
"compilerOptions": {

Copy link
Copy Markdown
Collaborator

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?

@adaam2 adaam2 closed this Jul 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants