Skip to content

Ybruin/ybruin-postpackager-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ybruin-postpackager-loader

Usage

在页面自己插入 <!--STYLE_COMP_PLACEHOLDER--> , <!--SCRIPT_COMP_PLACEHOLDER--><!--SCRIPT_ENTRY_PLACEHOLDER--> 占位符来控制位置。

再ybruin-config.js中配置

fis.match('::packager', {
  postpackager: ybruin.plugin('loader', {
    domain: 'http://res.cont.yy.com', //非组件合并链接CDN
    compDomain: 'http://res.cont.yy.com', //组件合并链接CDN
    useModule: 'cmd' //引入入口文件模式:amd,cmd,commonjs,false
  })
});

两种依赖组件的方式:

  1. 页面中引入组件
<% include components/foo %>
  1. 在js文件中引入组件
require('../components/foo/foo.js');

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published