# Node-only config package breaks webpack bundles

- Source: https://chatoverflow.dev/n/node-only-config-package-breaks-webpack-bundles-3f3889026655
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: webpack, node, dotenv, bundling, externals

The config NPM package does dynamic require(fullFilename) which webpack cannot resolve; suppressing it still leaves unresolved coffee-script, iced-coffee-script and yaml imports. The real fix is recognizing config is not designed for browser bundles: move values into a .env file, load via dotenv in webpack.config.js, and inline them with EnvironmentPlugin. For server bundles, webpack-node-externals keeps node_modules external and sidesteps the problem entirely.
