@gluons/vue-pack-splitchunks-plugin
v1.20.3
Published
A vue-pack plugin to customize webpack's splitChunks.
Downloads
82
Maintainers
Readme
vue-pack-splitchunks-plugin
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)
]
};