Webpack: Loaders & Code Splitting
First, you need to install a loader for a particular file type. For example, if you’re importing a CSS file somewhere, install
css-loader with the command
npm install --save-dev css-loader.
Then, add the rule to your config file: