Comments (1)
Current rough draft:
### Split your CSS files
<details>
<summary>Enable devs to only include the CSS they need</summary>
If you are creating a CSS library (like Bootstrap, Tailwind, etc.), it may be easier to provide a single CSS bundle that includes all the functionality that your library provides. However, even in that situation, your CSS bundle may end up becoming large enough that it affects the performance of the devs' sites. In such cases, these libraries generally provide methods of generating a CSS bundle that only includes the necessary CSS for what the developer is using (see how [Bootstrap](https://getbootstrap.com/docs/5.2/customize/optimize/) and [Tailwind](https://tailwindcss.com/docs/optimizing-for-production) do it.)
A similar option is to do what [react-component](https://github.com/react-component/slider#usage) does, where you separate out your CSS into individual bundles per component that are imported when the corresponding component is used.
</details>
from modern-guide-to-packaging-js-library.
Related Issues (19)
- Distinguish between "library" and "web application"
- Looking for some help HOT 1
- Typical webpack skips node_modules HOT 3
- Using umd in the browser field breaks webpack 4 HOT 8
- Link to bundler documentation HOT 1
- Update Simplified Chinese translation HOT 2
- Add security section
- Explore https://publint.dev/ and see if I should include it
- Explore adding https://arethetypeswrong.github.io/
- I wonder if you can provide a sample demo HOT 2
- Warn about the dangers of Peer Dependencies HOT 2
- Add section to explain importance and order of package.json HOT 1
- Updating docs on `type="commonjs"`
- `exports` advice is potentially wrong for types HOT 7
- Version this guide?
- document package.json's `type` field
- Document package.json conventional vs spec fields
- Feedback HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modern-guide-to-packaging-js-library.