edp-build-cdn
v0.1.0
Published
Processor for edp-build to add cdn support.
Downloads
6
Readme
edp-build-cdn
Processor for edp-build to add cdn support.
Getting Started
Install it via npm:
npm install edp-build-cdn
And include in your project:
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