This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS.
npm install @lynx-js/css-extract-webpack-plugin