Skip to content

Commit

Permalink
Show example size savings
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Oct 6, 2022
1 parent 259a416 commit 7332802
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This is a Webpack 5 plugin for tree shaking unused Quasar components from generated bundles. If you are using Quasar as a standalone UI library with Webpack, then you will be importing from `node_modules/quasar/dist/quasar.esm.prod.js`. However, Webpack cannot tree shake unused components from this file because this file contains circular references. We can instead import the source code from `quasar/src/index.prod.js` and use this plugin to break the dependency chain.

## Example Savings (in `./examples` dir)

| | Bundle Size | Gzipped Size |
|--- |---|---|
|Before| 559.07 KB | 171.02 KB |
|After | 184.23 KB | 62.75 KB |

## Usage

```ts
import { QuasarUnusedPlugin } from 'quasar-unused-plugin'

Expand Down

0 comments on commit 7332802

Please sign in to comment.