33 lines
609 B
JavaScript
33 lines
609 B
JavaScript
const path = require('path');
|
|
|
|
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: {
|
|
index: './src/index.js'
|
|
},
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, '../dist')
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.s?css$/,
|
|
use: ['style-loader', 'css-loader', 'sass-loader']
|
|
}
|
|
]
|
|
},
|
|
|
|
plugins: [
|
|
new CleanWebpackPlugin()
|
|
],
|
|
|
|
devServer: {
|
|
contentBase: './dist',
|
|
hot: true
|
|
},
|
|
};
|