0.0.1 • Published 1 year ago

fphui-theme v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Note on developing libraries

  1. using Vite project CLI as it contains typescript and rollup out of box
  2. Must put react ,react-dom, antd and styled components into external to avoid being bundled
  3. Must specify react ,react-dom, antd and styled components as peer dependency so that project can use the plugin

Reference

  1. ./react is missing on the exports. Solution https://github.com/apollographql/apollo-client/issues/9976. Adding "./": "./" solves the issue.
  2. Vite build multiple library and allow multiple import entry. Reference https://www.raulmelo.dev/blog/build-javascript-library-with-multiple-entry-points-using-vite-3
  3. Build multiple entry points using vite 3 - https://www.raulmelo.dev/blog/build-javascript-library-with-multiple-entry-points-using-vite-3
  4. if multiple modules are exported you can omit the main and something
  5. List all exported directory in the files field on package json
  6. aboslute import seems to be interferring with build