The Meteor resource is interpreted as a stylesheet, but passed with text of the MIME / html type

I use a meteorite, and I have static files located in a shared directory:

// Directory Structure

app
    app/.meteor
    app/server
    app/client
    app/packages
    app/lib
    app/public
        app/public/styles
        app/public/images

On mine index.html, I have this:

<link rel="stylesheet" href="/public/styles/app.css"/>

I still get this error:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:3000/public/styles/app.css".

How can I get out of this? What is the proper use of the public meteor catalog?

+3
source share
1 answer

You are requesting the wrong directory. Meteor serves HTML, like any path that does not point to a file.

Url must point to

<link rel="stylesheet" href="/styles/app.css"/>

Everything in publicshould display on/

+7
source

All Articles