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.async 加载动态变量模块 #43

Open
fwon opened this issue Sep 9, 2016 · 1 comment
Open

require.async 加载动态变量模块 #43

fwon opened this issue Sep 9, 2016 · 1 comment

Comments

@fwon
Copy link

fwon commented Sep 9, 2016

require.async(moduleId, callback);
当moduleId为一个变量从hash获取,而非固定字符串比如"xxx"的时候,fis-postpackager-loader无法生成映射表,这个时候会加载模块失败。

原本想在页面自己输出RESOURCE_MAP,不依赖fis-postpackager-loader,但是map中文件的key为完整路径,并非moduleId。这个表就没法使用了,我fis的配置如下:

fis.match('js/page/(**).js', {
    isMod: true,
    moduleId: '$1'
});

请问有何办法?

@fwon
Copy link
Author

fwon commented Oct 11, 2016

为什么RESOURCE_MAP生成的映射表res不以moduleId为key, 而是以file id 为key

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

1 participant