In my React index.js file, I am importing Bootstrap and using Webpack 4:
import React from 'react';
import ReactDOM from 'react-dom';
import './assets/css/index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import 'bootstrap/dist/css/bootstrap.min.css';
ReactDOM.render(<App />, document.getElementById('root'));
serviceWorker.unregister();
However, when I run the build process, I encounter this error message:
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css 6:3
Module parse failed: Unexpected token (6:3)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
module: {
...
{
test: /\.css$/,
exclude: /(node_modules)/,
use: ['style-loader', 'css-loader'],
},
...
}
Thank you for your assistance.