question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better CSS Imports

See original GitHub issue

According to the documentation, currently we just transform CSS files into JS files which append the CSS to the <head>. This isn’t that performant, I think we should look into possibly concatenating the CSS and writing it to a folder.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ijecommented, Jan 22, 2021

@shadowtime2000 you are right, this should be improved (first applyCSS should be ignored)! but we better to write css to js since we need to load page component/styling dynamically, even in production(bundling) mode.

0reactions
ijecommented, Feb 4, 2021

we need the applyCSS for HMR and page routing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

import - CSS: Cascading Style Sheets - MDN Web Docs
The @import CSS at-rule is used to import style rules from other valid stylesheets. An @import rule must be defined at the top...
Read more >
Best way to include CSS? Why use @import? - Stack Overflow
Yes, always use @import ! It works GREAT as a modern solution to using CSS. I highly recommend it! Its been used for...
Read more >
What is the best way to include CSS file? Why use @import?
Best Approach: The External Style Sheet (using HTML <link> Tag) is the best method which is used to link the element. Maintaining and...
Read more >
CSS @import Rule - W3Schools
The @import rule allows you to import a style sheet into another style sheet. The @import rule must be at the top of...
Read more >
CSS Import - KeyCDN
The CSS @import rule allows style rules to be imported into another style sheet.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found