This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the plugin | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
// Add to config plugins | |
config.plugins = [ | |
new MiniCssExtractPlugin() | |
]; | |
// Update the css rule of the loader from using a style-loader to use our custom plugin loader. | |
{ | |
test: /\.css$/, | |
use: [ | |
MiniCssExtractPlugin.loader, | |
"css-loader" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment