https://github.com/yanghuabei/edp-build-cdn
CDN processor for edp-build.
https://github.com/yanghuabei/edp-build-cdn
cdn edp edp-build edp-build-processor
Last synced: 9 months ago
JSON representation
CDN processor for edp-build.
- Host: GitHub
- URL: https://github.com/yanghuabei/edp-build-cdn
- Owner: yanghuabei
- License: mit
- Created: 2017-02-09T04:06:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T05:06:11.000Z (over 9 years ago)
- Last Synced: 2025-08-09T05:23:06.846Z (10 months ago)
- Topics: cdn, edp, edp-build, edp-build-processor
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# edp-build-cdn








Processor for edp-build to add cdn support.
## Getting Started
Install it via npm:
```shell
npm install edp-build-cdn
```
And include in your project:
```javascript
import CDNProcessor from 'edp-build-cdn';
let CDNProcessor = require('edp-build-cdn').default;
let processor = new CDNProcessor({
name: 'CDNProcessor',
// cdn加速域名
domain: '//xxx.xxcdn.com',
// cdn上的资源
resourceTypes: '*.{js,css,png}',
// 部署目录
dist: 'app',
// 需要处理的文件类型,目前仅支持html
files: [
'*.html'
],
// 是否需要在html head中增加cdn域名的prefetch
enableDNSPrefetch: true
});
```
## License
MIT