vue-cli-plugin-dll
Vue CLI 3 plugin for Dll and DllReference
起步
确保你安装的是 vue-cli 3.x.x 版本
$ vue -V
安装
$ vue add @liwb/vue-cli-plugin-dll
# OR
$ vue invoke @liwb/vue-cli-plugin-dll
快速开始
最方便的配置
你可以在vue.config.js 文件中的pluginOptions中定义一个dll参数对象。
// vue.config.js
module.exports = {
pluginOptions: {
dll: {
entry: ['vue', 'vue-router']
}
}
}
生成Dll文件
$ npm run dll
#OR
$ npx vue-cli-service dll
配置参数
vue.config.js:
module.exports = {
// Other options...
pluginOptions: {
dll: {
// 入口配置
entry: ['vue'],
// dll 资源输出目录,但不是最终 dist 目录下 index.html 引用的路径
output: path.join(__dirname, '