fex-team / fis3

FIS3
http://fis.baidu.com
BSD 2-Clause "Simplified" License
2.79k stars 693 forks source link

fis3 id属性的【bug】,居然不支持回调函数 #1071

Open wangyateng opened 7 years ago

wangyateng commented 7 years ago
fis.match(/^\/node_modules\/([^\/]+)\/(?:[^\/]+\/)*(.+)(\.[a-zA-Z0-9]+)$/, {
    release: function (param) {
        var name = param[1], fileName= param[2], ext = param[3];
        var packageJson = require(name + '/package.json');
        var path = [name, '/', packageJson.version, '/', fileName, ext];
        return path.join('');
    },
    id : '$1/$2$3'
});

release 属性支持回调函数方式,id属性居然不支持,现在版本号不能添加到 id属性里面,好大的坑~~

zhangtao07 commented 7 years ago

npm 插件直接 import 包名即可,不需要也不推荐用 id,参考fis3开发 react 的介绍http://fex.baidu.com/blog/2016/04/develop-react-with-fis3/