This repo contains code for blogpost: https://devtools.tech/optimizing-js-bundle-define-plugin-webpack
To try out, just do the following steps
git clone https://github.com/yomeshgupta/webpack-define-plugin.git
npm i
Use an exisiting config file from src/configs/
or create a new config in src/configs/
Update the config file path accordingly in main.js