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

能不能增加一个使用 mod.js 来异步加载 component 的 Demo? #13

Open
simplees opened this issue Nov 23, 2016 · 7 comments
Open
Assignees

Comments

@simplees
Copy link

如题,是不是可以考虑增加一些 mod.js 的特殊用法,以及异步产出文件的例外打包。这样可能会让这个脚手架被更多的普及使用。谢谢

@yanhaijing yanhaijing self-assigned this Nov 23, 2016
@yanhaijing
Copy link
Owner

这样写的就是异步的

require.async('xxx', function () {});

@simplees
Copy link
Author

回复好快,谢谢解答。但是怎么在打包的时候排除掉异步加载的 component 啊。
.match('/components/**.js', { packTo: '/pkg/components.js' })
现在的打包方式,好像会把所有组件全部都打包成 components.js

@yanhaijing
Copy link
Owner

components 里的不打包,或者改成白名单,只打包指定资源

@yanhaijing
Copy link
Owner

现在好像没办法 异步资源不打包!!!

@yanhaijing
Copy link
Owner

fis的打包和webpack的打包不一样!!!

@simplees
Copy link
Author

FIS可能要一个大的版本更新,才能跟上现在前端发展的脚步吧。不过一些传统类型的网站,fis还是非常顺手的。我就同时在用fis和webpack。

@yanhaijing
Copy link
Owner

webpack那个 common-chunk 还没fis这种手动打包好用吧。。。

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

No branches or pull requests

2 participants