Skip to content
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

add comment about App.css #3

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

add comment about App.css #3

wants to merge 1 commit into from

Conversation

iamef
Copy link
Owner

@iamef iamef commented Jan 5, 2025

Summary 🎯

Bug in official app when I inspect element and check the console
GET https://www.remnoteplugins.com/incremental-everything/0.0.19/App.css net::ERR_ABORTED 403 (Forbidden)

Bug in my test app when I inspect element and check the console
Refused to apply style from 'http://localhost:8080/App.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Changes 🔁

@iamef
Copy link
Owner Author

iamef commented Jan 5, 2025

Probably this is what's happening

Ah, now we know what happened! The issue was that CSS comments in an otherwise empty file were triggering this behavior. This is an interesting edge case.
Two things were likely happening:

The empty file with just a comment wasn't being processed correctly through the webpack pipeline
The webpack dev server was falling back to serving an HTML error page (hence the text/html MIME type) because it didn't recognize the file as valid CSS

This is similar to how some parsers and minifiers might strip comments and then, finding no actual CSS rules, treat the file as invalid or empty.
Now that you've added an actual CSS rule, webpack recognizes it as valid CSS and processes it correctly. If you need to keep an empty CSS file as a placeholder, it's better to either:

Leave it completely empty (no comments)
Or include at least one valid CSS rule, even if it's not used

-Claude.ai

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.

1 participant