// Generated using webpack-cli https://github.com/webpack/webpack-cli const path = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const isProduction = process.env.NODE_ENV == 'production'; const HtmlWebpackPlugin = require('html-webpack-plugin'); const autoprefixer = require('autoprefixer') const stylesHandler = isProduction ? MiniCssExtractPlugin.loader : 'style-loader'; const config = { entry: './src/js/main.js', output: { filename: 'main.js', path: path.resolve(__dirname, 'dist') }, devServer: { static: path.resolve(__dirname, 'dist'), port: 5000, hot: true }, plugins: [ new HtmlWebpackPlugin({ template: './src/index.html' }) ], module: { rules: [ { test: /\.s[ac]ss$/i, use: [ { // Adds CSS to the DOM by injecting a `