We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
有些第三方库自定义了自己的 require,并作为成员对象调用,比如 select2 这类lib库。这种情况就不应该分析里面的 require 语句,否则会出现类似以下的警告:
[WARNI] Can't resolve `jquery.select2` in file [/node_modules/select2/dist/js/select2.js], did you miss `npm install jquery.select2`?
我现在修改了下正则,加了一个 (?:\.\s*require\b):
(?:\.\s*require\b)
var rRequire = /"(?:[^\\"\r\n\f]|\\[\s\S])*"|'(?:[^\\'\n\r\f]|\\[\s\S])*'|(\/\/[^\r\n\f]+|\/\*[\s\S]+?(?:\*\/|$))|(?:\.\s*require\b)|\b(require\.async|require\.ensure|require)\s*\(\s*("(?:[^\\"\r\n\f]|\\[\s\S])*"|'(?:[^\\'\n\r\f]|\\[\s\S])*'|\[[\s\S]*?\])\s*/g;
从而排除对 xxx.require 的分析
xxx.require
The text was updated successfully, but these errors were encountered:
No branches or pull requests
有些第三方库自定义了自己的 require,并作为成员对象调用,比如 select2 这类lib库。这种情况就不应该分析里面的 require 语句,否则会出现类似以下的警告:
[WARNI] Can't resolve `jquery.select2` in file [/node_modules/select2/dist/js/select2.js], did you miss `npm install jquery.select2`?
我现在修改了下正则,加了一个
(?:\.\s*require\b)
:从而排除对
xxx.require
的分析The text was updated successfully, but these errors were encountered: