0.3.4 • Published 1 year ago

quasar-unused-plugin v0.3.4

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

Quasar Unused Plugin

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 SizeGzipped Size
Before559.07 KB171.02 KB
After184.23 KB62.75 KB

Usage

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

export default {
    plugins: [
        new QuasarUnusedPlugin(),
    ],
}

If you are externalizing node modules, you need to add quasar to the allowlist so that Webpack can process this package.

import nodeExternals from 'webpack-node-externals'

export default {
    externals: [
        nodeExternals({
            allowlist: [
                /^quasar*/,
            ],
        }),
    ],
}
0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago