pawjs
pawjs copied to clipboard
CSS Load Order different in Dev vs Prod
I have the following import statements in my client.js file -
import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
import "../node_modules/slick-carousel/slick/slick.css";
import "../node_modules/slick-carousel/slick/slick-theme.css";
import "../node_modules/font-awesome/css/font-awesome.min.css";
import "./resources/css/global.css";
In the development mode my global.css styles have higher preference than bootstrap which is as expected. But in Production the order of the CSS files loading changes with my custom css (global.css) loading before Bootstrap leading to an undesired situation.
I am using [email protected]
Also @tirthbodawala @ankushtiwari-atyantik The dynamic css chunks generated via webpack doesn't loads on Firefox only the static css that's pre injected via server.js works
Let me check that.
On Fri, May 1, 2020 at 12:02 AM Vaibhav Gurnani [email protected] wrote:
Also @tirthbodawala https://github.com/tirthbodawala @ankushtiwari-atyantik https://github.com/ankushtiwari-atyantik The dynamic css chunks generated via webpack doesn't loads on Firefox only the static css that's pre injected via server.js works
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Atyantik/pawjs/issues/45#issuecomment-622026861, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWDN7663N3XZ3DVK7QLWHTRPG75HANCNFSM4MLTF4QA .
-- Tirth Bodawala Founder Atyantik Technologies w: www.atyantik.com e: [email protected]
@tirthbodawala @ankushtiwari-atyantik
So this is how my style import looks like which works fine on chrome, this is generated by default in the build
<link rel="preload" href="/css/05c4bf064c71d806ba51.css" as="style" onload="this.rel='stylesheet'">
Now when I refactor it to following in browser it starts working fine on firefox, as I think firefox doesn;t supports preload, so you have any solution to fix this ?
<link rel="stylesheet" href="/css/05c4bf064c71d806ba51.css" >
@tirthbodawala @ankushtiwari-atyantik any help ?