Skip to content

Cannot import CSS into html component when serving site as Node.js doesn't understand Webpack module types #83

@esauter5

Description

@esauter5

First, I apologize if this is due to my own ignorance and not knowing enough about how webpack works, but I cannot seem to load any css files.

In html.jsx I have:

import './css/style.css';

Whenever I run gatsby serve, I get an "Illegal token error" on the css file. I've also seen "Unexpected reserved word" errors where javascript reserved words are used in the CSS (like @import). It doesn't appear that it is recognizing it as a css file, but the webpack loaders look good and I've seen the same thing done in gatsby examples.

Am I missing something obvious here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions