ESM `module` export differs from `main` export
Author: lygstateCreated Oct 10, 2020Updated Jul 5, 2026
Labelsbug :bug:
Webpack v4+ prefers the module field from package.json over the main field even when the webpack target is node.
Since the main module exports {parse, stringify} and the module module exports {default: {parse, stringify}}, this creates an issue when bundling with webpack.
Source: json5/json5