webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
mode: process.env.NODE_ENV || 'development',
output: {
path: path.resolve(__dirname, 'public'),
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.(scss)$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
],
},
plugins: [
new HtmlWebpackPlugin({
title: 'RSS',
template: 'index.html',
}),
],
};