You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for building this. It's been very helpful to me 🙏
I'm writing this issue to propose we build a set of more advanced examples that follow the industries best practices, while also covering the most popular scenarios. For example, let's say we're looking at:
Building a JS library for shared functionality, similar to lodash
Building a UI components library (maybe in React)
Then, let's build a very simple app that use those libraries and incorporates some best practices:
Monorepo
TypeScript
Tree-shaking
Lazy-loading
Handling asset imports for the ui library (eg: import logo from 'ui-components/assets/logo.svg)
Handling CSS, both Styled Components and CSS Modules.
Configuring the UI Components Library to work in a SSR scenario (eg: NextJS, Gatsby)
etc...
I think having examples that go in depth and promote good practices would help a lot. Ideally each bundler would have it's own set of examples, but since that's not really the case, maybe we can use this tool to create that.
The text was updated successfully, but these errors were encountered:
Just to leave a note here - I recently investigated what tooling can be used to create a component library with support for tree-shaking CSS.
Eventually arrived at two solutions:
CSS Modules and Rollup. Note that this is a fork of an existing repo, I just did some updates - so all credit to the original author. This relies on an forked postcss-plugin that does some magic with the exports, but it works well. https://github.com/mihkeleidast/css-modules-component-library-example
First of all thanks for building this. It's been very helpful to me 🙏
I'm writing this issue to propose we build a set of more advanced examples that follow the industries best practices, while also covering the most popular scenarios. For example, let's say we're looking at:
Then, let's build a very simple app that use those libraries and incorporates some best practices:
import logo from 'ui-components/assets/logo.svg
)I think having examples that go in depth and promote good practices would help a lot. Ideally each bundler would have it's own set of examples, but since that's not really the case, maybe we can use this tool to create that.
The text was updated successfully, but these errors were encountered: