2019-08-25 10:34:47 +00:00
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: 'development',
|
|
|
|
entry: {
|
|
|
|
index: './src/index.js'
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].bundle.js',
|
2019-08-25 10:46:48 +00:00
|
|
|
path: path.resolve(__dirname, '../dist')
|
2019-08-25 10:34:47 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2019-08-25 12:45:43 +00:00
|
|
|
test: /\.s?css$/,
|
|
|
|
use: ['style-loader', 'css-loader', 'sass-loader']
|
2019-08-25 10:34:47 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
new CleanWebpackPlugin()
|
|
|
|
],
|
|
|
|
|
|
|
|
devServer: {
|
|
|
|
contentBase: './dist',
|
|
|
|
hot: true
|
|
|
|
},
|
|
|
|
};
|