Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Relative CSS File import issue #241

Closed

Description

@seamc

I'm getting an issue using css-loader in conjunction with this (wonderful) project. Inclusion of a relative css file via import or require throws the following webpack compilation error via ASP.NET:

ERROR in ./ReactApp/components/ReactApp.css Module build failed: Error: Cannot find module './../../node_modules/css-loader/lib/css-base.js' at Function.Module._resolveFilename (module.js:440:15) at Function.Module._load (module.js:388:25) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at eval (eval at <anonymous> (D:\Code\JavaScriptServices\samples\react\ReactGrid\node_modules\css-loader\index.js!D:\Code\JavaScriptServices\samples\react\ReactGrid\ReactApp\components\ReactApp.css:54:2), <anonymous>:1:18)

Running webpack by itself will correctly process the .css file.

Within the ReactGrid sample application, I added a ReactApp.css file to the components directory and tried to include it at the app's root ReactApp.jsx file: import ./ReactApp.css. HMR will recognize a new .css file but will not hot reload anything.

Activity

  1. seamc commented on Aug 4, 2016

    @seamc
    Author

    I generated a new React project via yeoman and it's working with relative css declarations just fine. Might just be something funky with the path set up within the samples directory vs the root project.

    Anywho, I'm good. Will close unless there's anything else to add.

  2. SteveSandersonMS commented on Aug 4, 2016

    @SteveSandersonMS
    Member

    OK, not sure what was weird about your first project, but glad a new one was OK. If you do track down what was wrong and you suspect it's something anyone else might hit, please let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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