module: {
rules: [
{
test: /\.html$/i,
loader: "html-loader",
},
{
test: /\.(sass|css|scss)$/,
use: [
{// Creates `style` nodes from JS strings
loader : MiniCssExtractPlugin.loader,
options:{
publicPath:'../'
},
},
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader",
],
},
{
test: /\.(png|svg|jpe?g|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: "images",
}
},
],
},
{
test: /\.(svg|eot|woff|woff2|ttf)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: "fonts",
}
},
],
},
],
},
};