How to solve this Error in webpack

0

This is the error ERROR in ./index.js 1 Module not found: Error: Can not resolve './index.css'

This is my index.js

import React from 'react'; import ReactDOM from 'react-sun'; import './index.css'; import App from 'App';

    
asked by 10.01.2018 в 16:34
source

1 answer

0

Here is a link to an issue that looks a lot like your problem

link

you must have style-loader in your webpack.config

{
  module: {
    loaders: [
      { test: /\.css$/, loader: 'style!css' },
    ]
  }
}

and have it installed on your node_modules

npm install --save-dev style-loader
    
answered by 18.01.2018 в 22:06