const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
plugins: [new HtmlWebpackPlugin({
title: 'OlympTest',
favicon: '',
template: 'src/index.html'
})],
devServer: {
contentBase: './dist'
},
module: {
rules: [
{
test: /\.sss$/,
use: [
'style-loader',
'postcss-loader'
]
},
{
test: /\.(png|jpg|jpeg|svg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[path][name].[ext]'
}
}
]
}
]
}
};
В html подключаю вот так