-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix: styles not loading issue #461
base: master
Are you sure you want to change the base?
Conversation
1f95460
to
186436c
Compare
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #461 +/- ##
=======================================
Coverage 83.22% 83.22%
=======================================
Files 40 40
Lines 1073 1073
Branches 197 197
=======================================
Hits 893 893
Misses 168 168
Partials 12 12 ☔ View full report in Codecov by Sentry. |
186436c
to
5e6ab22
Compare
please attach the ticket in the description and fixed UIs screenshots as well |
import ExamplePage from './ExamplePage'; | ||
import AuthenticatedPage from './AuthenticatedPage'; | ||
|
||
import('./index.scss'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dynamic import here makes the CSS get dynamically loaded at runtime, resulting in a Flash Of Unstyled Content (FOUC).
It also doesn't explain why import './index.scss';
doesn't work given that's how all MFEs and other example apps in our JS library repos import it without an issue, e.g. frontend-component-footer
(source).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have looked into this issue and was not able to figure out why import './index.scss';
is not working. Webpack config and version all the things are exactly similar to the ones used in header/footer
.
However while doing RnD on this issue, I found this comment in webpack.dev.config
that "We don't care about FOUC in development"
. As this dynamic import is being used in the example app, in my opinion we can ignore this issue for now. What do you suggest?
5e6ab22
to
285cb9e
Compare
Ticket
example MFE application does not load styles from index.scss
Description:
This PR fixes the issue related to styles not being loaded.
Screenshots