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

Server Side Rendering #200

Closed
NithishReddy opened this issue Jul 3, 2018 · 4 comments
Closed

Server Side Rendering #200

NithishReddy opened this issue Jul 3, 2018 · 4 comments

Comments

@NithishReddy
Copy link

Hi,
In my project am using react-loadable plugin for lazyload js files and using mini-css-extract-plugin for lazyloading css.

am using abc.js component on both pages (i.e Apage and Bpage). on Apage, abc.js component using on page dom and on Bpage using on layer.
after running minicss extract plugin, the output file name coming as Apage~Bpage.css.

Apage~Bpage.css is not accessible while using react-loadable on server side rendering. on server side rendering, route base css file is coming as loading css links like on Apage => Apage.css.

@vincent-yao27
Copy link

I have the same problem with vue SSR. Is there any workaround?

@NithishReddy
Copy link
Author

For now, we have removed "abc~def.css" while giving below options in webpack config:
optimization: {
splitChunks: {
cacheGroups: {
default: false,//disable default 'commons' chunk behavior
vendors: false, //disable vendor splitting(not sure if you want it)
}
}
}

@serut
Copy link

serut commented Jul 25, 2018

I needed to exclude this module while testing our app using mocha-webpack (which is SSR). Otherwise the CSS was interpreted as JS.
See zinserjan/mocha-webpack#234

@michael-ciniawsky michael-ciniawsky changed the title Mini-css-extract-plugin issue on server side rendering Server Side Rendering Aug 24, 2018
@michael-ciniawsky michael-ciniawsky added this to the 0.5.0 milestone Aug 24, 2018
@michael-ciniawsky
Copy link
Member

#90 (comment)

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

4 participants