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

fis3+mod在mac下有问题 #26

Open
T-baby opened this issue Mar 1, 2016 · 0 comments
Open

fis3+mod在mac下有问题 #26

T-baby opened this issue Mar 1, 2016 · 0 comments

Comments

@T-baby
Copy link

T-baby commented Mar 1, 2016

在mac下 require.async 一个js文件后,fis3编译出来的并没有这个js文件,而且引用到了同文件夹下同文件名的html文件并且去掉了后缀名。

@5Mi
Copy link

5Mi commented Apr 29, 2016

我也好像碰到类似的问题了 开发环境中代码是这么一句

image
构建好之后的这句异步请求
image
但触发时会报错

image
这个 async.js 是和当前js同级的 正确的路径应该是
http://localhost:8080/dist/pages/home/async 而且应该有 .js 后缀
然后我在控制台下 把构建好的代码改成这样
image
然后才能找到 加载成功 不知道要怎么处理 require.async()里面是要特殊写吗 还是怎样

--更新下--
有异步请求的话 postpackage-loader会在mod.js的script标签后生成的一个 resourcemap 这样mod就能读取到异步依赖了, 之前是因为手贱在 mod的script标签后添加了一个<!--ignore--> 这样 postpackage-loader就会忽略这个script 找不到mod或data-loader属性 所以就没有自动添加resourcemap才会出现之前的问题 具体请参考

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