RTVision / esbuild-dynamic-import

Plugin for transform dynamic imports in esbuild
17 stars 5 forks source link

Add check for existance of symbol to support rebundling by Webpack #11

Closed st0nerhat closed 1 year ago

st0nerhat commented 1 year ago

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.