martpie / next-transpile-modules

Next.js plugin to transpile code from node_modules. Please see: https://github.com/martpie/next-transpile-modules/issues/291
MIT License
1.13k stars 85 forks source link

Needs esmExternals: 'loose' #249

Closed WillSquire closed 2 years ago

WillSquire commented 2 years ago

Next.js v12.0 throws an error using this module unless I add experimental: { esmExternals: 'loose' } to the config. It doesn't mention this in your docs. It might be helpful if it's in the README as it mentions v12.0 support. Either that or documentation on loading the module with import rather than require.

martpie commented 2 years ago

Tests are green without this flag, please follow the issue template if there is a bug with a particular setup. :)