naopoyo.com
  • Docs
  • Tags
  • Bookmarks
  • Tools
  • About
  • Docs
  • Tags
  • Bookmarks
  • Tools
  • About

目次

© naopoyo

🐡

開発日記-2024-07-15 / Reactコンポーネントのnpmパッケージ公開が進んでいる

公開日
1年以上前
2024-07-15
更新履歴
GitHubで見る
  • 開発日記
  • npm

CSS Modulesの型を生成する

CSS Modulesを型安全にする仕組み
zenn.dev favicon
zenn.dev
CSS Modulesを型安全にする仕組み
【React / TypeScript】CSS modulesの型を生成する | Offers Tech Blog
zenn.dev favicon
zenn.dev
【React / TypeScript】CSS modulesの型を生成する | Offers Tech Blog

npmでReactコンポーネントパッケージを作る

Publish Your React Component to NPM
How to publish React Component with Tailwind CSS and tsup as module bundle on NPM
medium.com favicon
medium.com
Publish Your React Component to NPM
GitHub - TimMikeladze/typescript-react-package-starter: 📦 Develop & publish Typescript or React packages with ease. PostCSS, Vitest, Biome & Storybook support out of the box. Integrates with Github releases and automatically publishes to NPM. Code is buil
📦 Develop & publish Typescript or React packages with ease. PostCSS, Vitest, Biome & Storybook support out of the box. Integrates with Github releases and automatically publishes to NPM. Co...
github.com favicon
github.com
GitHub - TimMikeladze/typescript-react-package-starter: 📦 Develop & publish Typescript or React packages with ease. PostCSS, Vitest, Biome & Storybook support out of the box. Integrates with Github releases and automatically publishes to NPM. Code is buil

tsupでReactのクライアントコンポーネントをビルドする場合

npmパッケージで "use client" をつけたクライアントコンポーネントを公開する時、tsupでビルドする場合に設定を工夫しないとコンポーネントから "use client" の記述が消えてしまう場合がある。この時パッケージの利用側では使えずにエラーになってしまう。

Build react package for use in nextjs 13 · Issue #835 · egoist/tsup
I tried create a package with ui components for use in Nextjs 13 web app, but I can't build components with "use client" in the beginning of code, like that: "use client" import * as AspectRatioPri...
github.com favicon
github.com
Build react package for use in nextjs 13 · Issue #835 · egoist/tsup
Kuma UI はどのように React Server Components をサポートしているのか
zenn.dev favicon
zenn.dev
Kuma UI はどのように React Server Components をサポートしているのか

esm, cjsのファイルを同じ階層に置いてしまうとエラーになる

ESM packages need to be imported

上記のエラーが発生する。まだ整理できていないが、dist/esm、dist/cjsと分けることで解決している。

目次

この記事にリンクしている記事

🚵
開発日記-2024-07-26 / npmパッケージ公開用のモノレポにsandbox的な仕組みを取り入れたいと思った
1年以上前 - 2024年07月26日
  • 開発日記
  • npm

最近更新された記事

🛷
開発日記-2025-10-29 / tocbot のオプション
約9時間前 - 2025年10月29日
  • 開発日記
  • tocbot
🚩
Next.js 16にアップグレードする
1日前 - 2025年10月27日
  • Next.js
✒️
エンジニア個人ブログまとめ
2日前 - 2025年10月27日
  • デザイン
  • Next.js
  • Markdown