Vue CLI 3 plugin for Dll and DllReference
make sure you have vue-cli 3.x.x
vue -V
vue add dll
# OR
vue invoke dll
Simple configuration more
// vue.config.js
module.exports = {
entry: {
dll: ['vue', 'vue-route']
}
}
if you want make your configuration clear, you can config options of pluginOptions
in vue.config.js
:
// vue.config.js
module.exports = {
pluginOptions: {
dll: {
entry: ['vue', 'vue-route']
}
}
}
npm run dll
#OR
npx vue-cli-service dll
vue.config.js:
module.exports = {
// Other options...
pluginOptions: {
dll: {
// Enable DllReferencePlugin
open: true,
// vonder entry
entry: ''
// chunk and manifest file dir
output: '' // default 'yourProjectPath/pul'
}
}
}
name | type | des | default | required |
---|---|---|---|---|
entry | Object/Array/String | Vondor entry | null | true |
open | Binary | Enable DllReferencePlugin | true | false |
output | String | chunk and manifest file dir | 'yourProjectPath/public/dll' | false |
config entry in vue.config.js, but you have to configure it in the prescribed format.
module.exports = {
// Other options...
entry: {
// Single entry
dll: ['vue', 'axios'],
// or
dll_vendorName: ['vue', 'axios'],
// Multiple entry
dll_vendorNameOne: ['vue-route'],
dll_vendorNameTwo: ['vue-vuex'],
}
}
the entry also can be configured via the pluginOptions in vue.config.js
module.exports = {
// Other options...
pluginOptions: {
dll: {
// Single entry
entry: ['vue', 'axios'],
// Multiple entry
entry: {
vendorNameOne: ['vue-route'],
vendorNameTwo: ['vue-vuex'],
}
}
}
}