2019-06-07 14:46:13 +00:00
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin'); //installed via npm
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: './src/index.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: 'bundle.js'
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
{ loader: "style-loader" },
|
|
|
|
{ loader: "css-loader" },
|
2019-06-07 18:07:24 +00:00
|
|
|
{ loader: "sass-loader" },
|
2019-06-07 14:46:13 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({ template: './src/index.html' }),
|
|
|
|
],
|
|
|
|
devServer: {
|
|
|
|
contentBase: path.join(__dirname, 'dist'),
|
|
|
|
compress: true,
|
|
|
|
port: 8080,
|
|
|
|
hot: true,
|
|
|
|
}
|
|
|
|
};
|