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

在Vue服务器渲染时,使用异步组件按需加载时遇到的问题 #100

Open
GarrettZhang opened this issue Oct 26, 2018 · 1 comment

Comments

@GarrettZhang
Copy link

服务器可以渲染出dom,但是没有在头部内敛css,在浏览器端运行后会在 head 中会插入<script charset="utf-8" src="/public/js/chunk/1.js"></script>和css,因为css是后加载的,所以页面会闪烁。我想咨询一下是否可以在首屏渲染时,异步组件的css能插入head中,并且浏览器端不要在首屏时插入chunk,而是只在触发事件时候再请求组件。

@hubcarl
Copy link
Collaborator

hubcarl commented Aug 8, 2019

这个需要把 webpack css extract 时,把所有 chunk 都提取出来来

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