Skip to content

sadnessOjisan/rollup-template-for-component-lib

Repository files navigation

rollup-template-for-component-lib

component library を作るための rollup template

note

styled-components/styled-components#3045 (comment) の問題があるので s-c は 4.4.1 にデグレした

todo

  • TS 対応
  • 型定義を出力
  • 画像読み込み(png, jpg, gif)
  • tag から npm publish
  • minify
  • styling
  • test を追加
  • bundle size が大きい

Q

  • コンポーネントライブラリを作る時、tsc の target / module は ESNext にしといていいか?(呼び出す側でトランスパイルされる前提)
  • rollup で TS 利用、型定義の出力サポート的に rollup-plugin-typescript2 を使うべき? (not @rollup/plugin-typescript)