2.0.4 • Published 4 years ago
dn-middleware-dll v2.0.4
group: middleware name: dll
title: Dll
dn-middleware-dll
Dll 中间件可用于将所有第三方依赖打包为独立的 lib
文件,以提高项目的构建速度,大多数情况能够下,对比不启用时能节省超过 2/3
的时间。
使用
dev:
- name: clean
- name: dll
- name: webpack
dll
中间件必须放在 webpack
中间件之前,并且每个 dll
中间件只对它后边第一个 webpack
中间件生效。
dll
中间件还有四个选项,分别为:
cache
开启或关闭缓存libName
指定生成的库文件
的文件名称vendors
指定打包为 'lib' 的依赖包名列表output
指定输出目录
dev:
- name: clean
- name: dll
cache: false # 可省略,默认为 true 启用缓存
output: ./scripts # 可省略,默认为 ./build/js
libName: xxx # 可省略,默认为 lib
vendors: # 可省略,默认将从 package 中的 dependencies 解析
- react
- react-dom
- name: webpack
注意,在 vendors
未指定时,将依据 dependencies
中的依赖配置生成 lib
,所以此时一定要注意在 dependencies
不要放置项目执行无关的包,本地开发时才用到的依赖到请放到 devDependencies
。
2.0.3
4 years ago
2.0.4
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago