Check head tag, there are no inline styles from the current route
What is expected?
There should be style tags with data-vue-ssr-id attribute
What is actually happening?
Output includes only link tags to external CSS files
The issue is related to replacement of extract-text-webpack-plugin with extract-css-chunks-webpack-plugin.
It seems that with newer plugins, vue-style-loader doesn't get called in all cases where it would as the value of the fallback option to the legacy plugin.
There is no styles field on the context after rendering the app, as you can see here
dszymon commentedNov 26, 2020
•
edited
Version
2.5.22
Reproduction link
https://github.com/Szymon-D/VueSsrStylesReproduction
Steps to reproduce
npm install
npm run build
npm start
head
tag, there are no inline styles from the current routeWhat is expected?
There should be
style
tags with data-vue-ssr-id attributeWhat is actually happening?
Output includes only
link
tags to external CSS filesThe issue is related to replacement of
extract-text-webpack-plugin
withextract-css-chunks-webpack-plugin
.It seems that with newer plugins,
vue-style-loader
doesn't get called in all cases where it would as the value of thefallback
option to the legacy plugin.There is no
styles
field on the context after rendering the app, as you can see herevue/packages/vue-server-renderer/build.dev.js
Line 9397 in 4f81b5d
it's defined only in case if there's a
_renderStyles
function, which comes from thevue-style-loader
https://github.com/vuejs/vue-style-loader/blob/477c25e1a506c54e18cb443f7981aed6d4e80e65/lib/addStylesServer.js#L16
The text was updated successfully, but these errors were encountered: