@gluons/vue-pack-splitchunks-plugin

A vue-pack plugin to customize webpack's splitChunks.

Stats

StarsIssuesVersionUpdatedCreatedSize
@gluons/vue-pack-splitchunks-plugin
281.20.32 years ago3 years agoMinified + gzip package size for @gluons/vue-pack-splitchunks-plugin in KB

Readme

vue-pack-splitchunks-plugin

license npm TSLint lerna Travis (.com) Codacy grade Known Vulnerabilities

A vue-pack plugin to customize webpack's splitChunks.

Installation

Require vue-pack.

npm install --save-dev @gluons/vue-pack
# or
yarn add --dev @gluons/vue-pack

Then install this plugin.

npm install --save-dev @gluons/vue-pack-splitchunks-plugin
# or
yarn add --dev @gluons/vue-pack-splitchunks-plugin

Usage

Add this plugin into vue-pack config.

vue-pack.config.js

const splitChunks = require('@gluons/vue-pack-splitchunks-plugin');

const options = {
    // For all webpack's config
    tapAll(splitChunks) {
        // Do anything with `splitChunks`

        return splitChunks;
    },


    // For individual webpack's config
    tapCJS(splitChunks) {
        // Do anything with `splitChunks`

        return splitChunks;
    },
    tapESM(splitChunks) {
        // Do anything with `splitChunks`

        return splitChunks;
    },
    tapSSR(splitChunks) {
        // Do anything with `splitChunks`

        return splitChunks;
    }
    tapWeb(splitChunks) {
        // Do anything with `splitChunks`

        return splitChunks;
    }
};

module.exports = {
    plugins: [
        splitChunks(options)
    ]
};

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.