Skip to content

Instantly share code, notes, and snippets.

View cngondo's full-sized avatar
🎯
Focusing

Cornellius Ngondo cngondo

🎯
Focusing
  • Galvanize
  • Mexico City, Mexico
View GitHub Profile
@cngondo
cngondo / Webpack.config.js
Last active March 16, 2022 20:50
SIMPLE WEBPACK 5 SETTINGS WITH CORRESPONDING package.json FOR REACT
const dev = process.env.NODE_ENV !== 'production' // Loads the environment that you're running on
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
module.exports = {
mode:'development',
devtool: dev ? 'inline-source-map': 'eval-source-map', // Maps the line numbers of jsx files to the ones in the bundle
entry: path.join( __dirname, 'client/src/index.jsx'),
module: { // All modules to be used in the app