Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ dictionary.forEach(term => {

For detailed API documentation, code examples, and more, visit the **[documentation](https://kyco.github.io/dev-dict/docs)**.

## Bundle Size & Tree-Shaking

Dev-dict contains 200+ terms. To keep your bundle small, import only the terms you need via sub-path entry points.

**Preferred — import specific terms from `dev-dict/terms`:**

```typescript
// GOOD - Only react and typescript are included in your bundle
import { react, typescript } from 'dev-dict/terms'
```

**Avoid importing from the root entry point** when you only need a subset of terms — it pulls in the entire dictionary at once and cannot be tree-shaken:

```typescript
// BAD - Includes all 200+ terms regardless of what you use
import { terms } from 'dev-dict'
```

The root entry is best suited for server-side or build-time use cases where you need the full dataset (e.g. generating a static glossary page).

## Supported Languages

| Locale | Language | Status |
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"import": "./dist/utils-entry.js"
}
},
"sideEffects": false,
"files": [
"dist"
],
Expand Down
Loading