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

Sass preprocessor creates .css file with content-type text/html #3149

Closed
cubanpete opened this issue Sep 18, 2017 · 4 comments
Closed

Sass preprocessor creates .css file with content-type text/html #3149

cubanpete opened this issue Sep 18, 2017 · 4 comments

Comments

@cubanpete
Copy link

Hi guys,
I've installed the sass-chokidar as explained in readme file. All scss files are compiled in to one App.css file and then I import it in the html file with

<link href="/src/App.css" rel="stylesheet" type="text/css">

The classes in the file is not beeing rendered in the browser and when I inspect it in the network inspector, I can se that it has a content-type of "text/html". Can anyone help me where to add a content-type to the App.css file?

Thanks
Kasper

@inf3cti0n95
Copy link

@cubanpete could you post a link to the project, some piece of code that would recreate the error, or some screenshots of the configuration and errors

@stereobooster
Copy link
Contributor

@cubanpete content type is configured in web server mime types. For example in nginx https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types

@JLarky
Copy link

JLarky commented Oct 15, 2017

@cubanpete Try importing from index.jsx (as it described in docs) instead of adding it into index.html. It will also work with hot reloading of css this way.

@Timer
Copy link
Contributor

Timer commented Oct 15, 2017

The solution here is what @JLarky advises; please import this in JavaScript (index.js) instead of HTML.

@Timer Timer closed this as completed Oct 15, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants