I'm currently working on incorporating the select2 jquery library into my React application, which was created using create-react-app.
After adding jquery and select2 to my package.json file, I was able to get the javascript functionality to work properly.
However, I ran into an issue with the styling not being applied correctly because the css file for select2 was not included as expected.
In my project directory, I noticed the following file:
node_modules/select2/dist/css/select2.min.css
My initial solution was to manually copy this file into public/css and link it in my index.html like so:
<link href="css/select2.min.css" rel="stylesheet">
I know there must be a more efficient way to handle this using webpack and the create-react-app toolchain. But how can I achieve this?