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
| @@ -4,18 +4,19 @@ | |||
| "packageManager": "pnpm@9.0.0", | |||
There was a problem hiding this comment.
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.
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.
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.
Should we just set noEmit in here directly to avoid accidental npm tsc nonsense?
No description provided.