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 2.4.3 ssr critical CSS not injected (regression from 2.4.2) #6603

Closed
cjd6568358 opened this issue Sep 14, 2017 · 9 comments
Closed

vue 2.4.3 ssr critical CSS not injected (regression from 2.4.2) #6603

cjd6568358 opened this issue Sep 14, 2017 · 9 comments

Comments

@cjd6568358
Copy link

Version

2.4.3

Reproduction link

http://无法提供

Steps to reproduce

npm install 最新的vue/vue-server-renderer/vue-template-compiler (2.4.3),服务端渲染的页面html不包含css 样式

What is expected?

2.4.3版本 SSR 返回的html正常包含CSS

What is actually happening?

不包含


当我把package.json 中 vue/vue-server-renderer/vue-template-compiler 的版本号改回2.4.2,重新安装,一切就正常了。

@cjd6568358
Copy link
Author

2.4.2 SSR html
2 4 2 ssr html
2.4.3 SSR html
2 4 3 ssr html

@cjd6568358
Copy link
Author

vue-loader options
options

@cjd6568358
Copy link
Author

我在createBundleRenderer 传入 inject: false 后 ,index.html 这样写 还是不行。
index
所以我怀疑是不是提取关键CSS这一步出了什么问题?
*.vue 里的style标签是这样写的
vue style

@cjd6568358
Copy link
Author

整个SSR项目参考自vue-hackernews-2.0https://github.com/vuejs/vue-hackernews-2.0/

@defcc
Copy link
Member

defcc commented Sep 14, 2017

@cjd6568358 你可以把你的代码 push 到 github 上来,把仓库链接贴过来,方便其他人跟进这个问题。

@yyx990803 yyx990803 changed the title vue 2.4.3 ssr 自动注入 CSS 无效, 2.4.2 版本是可以的 vue 2.4.3 ssr critical CSS not injected (regression from 2.4.2) Sep 14, 2017
@cjd6568358
Copy link
Author

@defcc 好的。我的项目地址是https://github.com/cjd6568358/vue-ssr

@nemtsov
Copy link

nemtsov commented Sep 14, 2017

We're experiencing this regression too with 2.4.3. Reverting to 2.4.2 and will give you some more info when it's available.

@yyx990803
Copy link
Member

Fixed in 2.4.4

ztlevi pushed a commit to ztlevi/vue that referenced this issue Feb 14, 2018
fix vuejs#6603, (regression caused by attempt to fix vuejs#6353)
@tengmaoqing
Copy link

Fixed in 2.4.4

现在 2.5.19 好像又有这个问题了,css没有自动注入

f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
fix vuejs#6603, (regression caused by attempt to fix vuejs#6353)
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

5 participants