问题描述
在导入 bootstrap.css 的时候,报错:此处 bootstrap 为 3.3.7 版本
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.css 7:5
Module parse failed: Unexpected token (7:5)
You may need an appropriate loader to handle this file type.
| */
| /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
> html {
> | font-family: sans-serif;
> | -webkit-text-size-adjust: 100%;
> @ ./src/components/CmtList.jsx 28:0-55 29:12-19
> @ ./src/index.js
> @ multi (webpack)-dev-server/client?http://localhost:8081 (webpack)/hot/dev-server.js ./src
可是我明明配置了 css-loader sass-loader less-loader file-loader url-loader 等各种loader。。。
出错原因及解决办法
{
test: /\.css$/,
use: [
'style-loader',
'css-loader?modules&localIdentName=[path][name