Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs React表Css的模块分析失败_Reactjs_Webpack - Fatal编程技术网

Reactjs React表Css的模块分析失败

Reactjs React表Css的模块分析失败,reactjs,webpack,Reactjs,Webpack,导入时遇到问题:import'react table/react table.css' 我得到这个错误: ModuleParseError: Module parse failed: /Users/andy/Sites/purpose-www/node_modules/react-table/react-table.css Unexpected token (1:0) You may need an appropriate loader to handle this file type. 但是

导入时遇到问题:
import'react table/react table.css'
我得到这个错误:

ModuleParseError: Module parse failed: /Users/andy/Sites/purpose-www/node_modules/react-table/react-table.css Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
但是我已经为
css加载器
设置了网页包配置。这是我的网页配置:

module: {
    loaders: [
      {
        test: /\.css$/,
        exclude: /node_modules/,
        loader: 'style-loader!css-loader?localIdentName=[name]__[local]__[hash:base64:5]&modules&importLoaders=1&sourceMap!postcss-loader',
      }, {
        test: /\.css$/,
        include: /node_modules/,
        loaders: ['style-loader', 'css-loader'],
      }, {
        test: /\.jsx*$/,
        exclude: [/node_modules/, /.+\.config.js/],
        loader: 'babel',
      }, {
        test: /\.(jpe?g|gif|png|svg)$/i,
        loader: 'url-loader?limit=10000',
      }, {
        test: /\.json$/,
        loader: 'json-loader',
      },
    ],
  },
Bable.rc:

{
  "presets": ["react", "es2015", "stage-0"],
  "plugins": ["react-hot-loader/babel", "react-html-attrs", "transform-class-properties"],
  "env": {
    "production": {
      "presets": ["es2015", "react", "react-optimize", "es2015-native-modules", "stage-0"]
    }
  }
}

有什么想法吗?

为什么要测试css两次?你有什么想法吗。babelrc@Aaqib是的,我知道,你需要看它吗?为什么你要测试css两次,在这些情况下删除并包括node_模块?这刚刚包含在mern.io工具中。我删除了第一个,但仍然没有工作。