chenmnkken / gulp-seajs-combo

seajs(CMD) Module combo pulgin for gulp
MIT License
53 stars 20 forks source link

向刀哥报告一个js代码文件内容解析的bug #6

Closed shinvey closed 8 years ago

shinvey commented 9 years ago
/*
 if (location.href.indexOf("?dev") > 0) {
     seajs.use("./src/a", function () {
        console.log(arguments);
     });
 }
*/
seajs.use("./src/a", function () {
    console.log(arguments);
});

以上代码在执行gulp-seajs-combo/index.jspullDeps( options, rDeps, item )会报错,去掉注释中的if条件就没问题,我想应是rDeps正则匹配问题。origId在被赋值成?dev时代码粗bug了。

chenmnkken commented 9 years ago

使用正则匹配时碰到注释中的内容解析会有问题,暂时还木有好的解决方案……

发自我的 iPhone

在 2015年7月24日,18:16,Shinvey notifications@github.com 写道:

/ if (location.href.indexOf("?dev") > 0) { seajs.use("./src/a", function () { console.log(arguments); }); } / seajs.use("./src/a", function () { console.log(arguments); }); 以上代码在执行gulp-seajs-combo/index.jspullDeps( options, rDeps, item )会报错,去掉注释中的if条件就没问题,我想应是rDeps正则匹配问题。origId在被赋值成?dev时代码粗bug了。

— Reply to this email directly or view it on GitHub.