-
Notifications
You must be signed in to change notification settings - Fork 80
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
Control style tag position #48
Comments
Not currently. But just grab the |
What do you mean? The stylesheets from ${styles.map(style => `<link rel="stylesheet" type="text/css" href="${style}">`)}
<style id="css-markup">${cssMarkup || ''}</style> But in my client (browser), the order changes and the universal styles will be below the css-markup styles and I have no clue how to change that. |
HMR will put them in different orders during development and code splitting will likely put them at the bottom or end. Check the importCss.js file in the babel plugin to see where it a injected. Then do a PR to configure the order as an option in your babel plugin. U shouldn't need to know much babel plugin code to pass that option along to the basic js that does the importing of CSS. |
Thanks, I'll play around with this. I copied the whole babel plugin into my app and I can now control the link anchor point on my own. Still thinking about the best solution, but maybe I'll try to just append it below the last As a side effect of copying the universal babel plugin, my problems with faceyspacey/webpack-flush-chunks#20 went away and server rendering works fine, no more getting stuck at loading. Thanks for your wonderful work, this is indeed the best solution for code splitting and lazy style/script loading to date! |
Thanks brother. Glad it worked out for u. |
Hey, is there any way to control at what position the css should be put in the ? The order plays an important role and I need it to be top and not bottom-most.
The text was updated successfully, but these errors were encountered: