Skip to content

Conversation

janoist1
Copy link

A split point has been added that gives ability to this loader to work on the server side. On client, everything is the same but on server side it won't try to manipulate the DOM and also, it has been extended to collect the styles into a global variable global.__styles__ which can be used when assembling the layout.

@ndreckshage
Copy link

ndreckshage commented Dec 12, 2016

@janoist1 using a singleton for ssr? this seems to build styles between page requests.

/page-1 -> .page1 { color: blue}
/page-2 -> .page1 { color: blue} .page2 { color: green}
/page-3 -> .page1 { color: blue} .page2 { color: green} .page3 { color: purple}

also trying global.__styles__ = null end of each request, the pitch function not hit again.

@ekulabuhov
Copy link
Member

Both this and #159 are trying to accomplish similar goals. From what I gather, SSR is outside the scope for the style-loader. I think we need to add that to the Readme file and direct people to common solutions for this problem.

@joshwiens joshwiens closed this Mar 12, 2017
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

Successfully merging this pull request may close these issues.

4 participants