When using esbuild to bundle an npm package for distribution in a registry, we want our package to be able to be bundled into another bundle by consuming projects. When we tried to consume an esbuild-bundled package in a nextjs project, we encountered an error where mod[Symbol.toStringTag] is already populated with an immutable value. This PR simply checks for that situation and leaves the value alone.
When using esbuild to bundle an npm package for distribution in a registry, we want our package to be able to be bundled into another bundle by consuming projects. When we tried to consume an esbuild-bundled package in a nextjs project, we encountered an error where
mod[Symbol.toStringTag]
is already populated with an immutable value. This PR simply checks for that situation and leaves the value alone.