Last active
October 14, 2020 21:34
-
-
Save adarshbhat/3ec5950b66b78102da0cf46e51a3d633 to your computer and use it in GitHub Desktop.
Webpack configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | |
module.exports = { | |
mode: 'development', | |
entry: { | |
app: './src/index.js' | |
}, | |
output: { | |
filename: '[name].bundle.js', | |
path: path.resolve(__dirname, 'dist') | |
}, | |
devtool: 'inline-source-map', | |
devServer: { | |
contentBase: './dist' | |
}, | |
plugins: [ | |
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }), | |
new HtmlWebpackPlugin({ | |
title: 'Development' | |
}) | |
], | |
node: { | |
module: 'empty', | |
net: 'empty', | |
fs: 'empty' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error message: