-
Notifications
You must be signed in to change notification settings - Fork 2
feat: v2.0.0(alpha): distribute moonshine as pure ts #324
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
base: main
Are you sure you want to change the base?
Conversation
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
| { | ||
| "name": "@speakeasy-api/moonshine", | ||
| "version": "1.9.1", | ||
| "packageManager": "pnpm@9.0.0", |
There was a problem hiding this comment.
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": { | ||
| ".": { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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": { | |||
There was a problem hiding this comment.
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?
No description provided.