Reusable and composable webpack presets
npm i -D @nod/webpack-config-presets
const {
web, // web safe build without native node modules
dotEnv, // loads dotenv environment variables
reducePluginLeft, // drops the first defined plugin useful
} = require('@nod/webpack-config-presets')
const config = {} //...your custom Webpack Config
module.exports = web(dotEnv(reducePluginLeft(yourWebpackConfig))),
Please see @nod/nod monorepo
Apache 2.0