Skip to content

You may need an appropriate loader to handle this file type #686

@fahamidev

Description

@fahamidev

Hi.
I put my problem inside the stackoverflow .

and in summary :

I received the following error :

ERROR in ./public/testStyle.css
Module parse failed: /media/ehsan/news-ssr/public/testStyle.css Unexpected token (1:5)
You may need an appropriate loader to handle this file type.
| body {
|     background-color: red;
| }
 @ ./src/client/pages/HomeContainer.js 31:0-40
 @ ./src/client/Routes.js
 @ ./src/client/client.js

and css-loader config :

            {
                test: /\.css$/,
                include: /node_modules/,
                use: [
                    'style-loader',
                    {
                        loader: 'css-loader',
                        options: {modules: true, sourceMap: true}
                    }
                ]
            }

package versions :
"webpack": "^3.11.0" , "style-loader": "^0.18.2" , "css-loader": "^0.28.9"

Note that I have researched so much and I have not reached the result, so I thought I would ask here to answer it

Thank you for your advice.

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