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

压缩混淆模块后,局部require的方法名如果不是require,则无法加载module #63

Closed
huzhongchun opened this issue Sep 7, 2016 · 2 comments

Comments

@huzhongchun
Copy link

/**
* 判断模块是否完成相应的状态
*
* @inner
* @param {string} id 模块标识
* @param {number} state 状态码,使用时传入相应的枚举变量,比如MODULE_DEFINED
* @return {boolean} 是否完成相应的状态
*/
function modIs(id, state) {
return modModules[id] && modModules[id].state >= state;
}

局部require的id没有加入modModules,所以这个方法check失败

@otakustay
Copy link
Member

这是by design的,压缩工具有选项不混淆require等关键参数

Gray Zhang

在 2016年9月7日 at 上午10:13:20, huzhongchun (notifications@github.com) 写到:

/**

局部require的id没有加入modModules,所以这个方法check失败


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#63, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnCPUUl5CVTia0ApqrRpfgd-LlKWJzBks5qnh3AgaJpZM4J2d4L
.

@erik168
Copy link
Contributor

erik168 commented Sep 22, 2016

@erik168 erik168 closed this as completed Sep 22, 2016
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

3 participants