vyx-hex/webpack.config.js

32 lines
656 B
JavaScript

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" },
{ loader: "sass-loader" },
],
},
],
},
plugins: [
new HtmlWebpackPlugin({ template: './src/index.html' }),
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 8080,
hot: true,
}
};