Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对于内部实现 amd 规范的库需要添加 skipParse 属性 #8

Open
GilbertSun opened this issue Nov 12, 2015 · 4 comments
Open

Comments

@GilbertSun
Copy link

本插件对于普通 amd 模块和 cmd 模块表现非常优秀,但是我今天尝试处理 WebUploader的时候出现了问题

WebUploader 里实现了自己内部的模块加载器,fis 在处理的时候将最后导出的模块的那句

define('webuploader',[
    'preset/all',
    'widgets/log'
], function( preset ) {
    return preset;
});
return require('webuploader');

会被替换为

define('webuploader',[
    'preset/all',
    'widgets/log'
], function( preset ) {
    return preset;
});
return require('bower_components/fex-webuploader/dist/webuploader');

我现在尝试的解决方案是,添加一个对skipParse属性的检测,对于这种不应该由插件分析依赖的文件,就跳过分析的过程

不知道是不是有其他更好的解决方案

@2betop
Copy link
Contributor

2betop commented Nov 12, 2015

webuploader 应该更新了,你更新下试试。

@GilbertSun
Copy link
Author

没有啊,我通过 bower 安装的,我去看了下 github 的源码,好像没有见到修复这个问题的方法

@2betop
Copy link
Contributor

2betop commented Nov 12, 2015

原来是 bower, 我以为是用 fis3 install webuploader 下来的呢

@GilbertSun
Copy link
Author

我还没用过 fis 自带的组件系统呢,我先去研究一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants