electron-redux icon indicating copy to clipboard operation
electron-redux copied to clipboard

Use standard package.json exports pattern

Open wnayes opened this issue 1 year ago • 1 comments

This updates the alpha branch package.json to use exports to declare the different available exports. I was having a lot of trouble using the ESM code in the current alpha with how it is currently set up.

This would be considered a breaking change, however it seems like the right direction to pursue for a future major release.

The first commit implements the proposed package exports changes.

The second commit updates the repository so that test code continues to compile. This was a little more involved.

  • The package.json exports pattern is only handled in TS 4.7+, so I updated typescript to that version.
  • Webpack also seemed like it needed to be updated due to webpack#14532 which otherwise causes an error like "Error: error:0308010C:digital envelope routines::unsupported."
  • The tests don't pass, however I believe the not passing behavior is the same as on the existing alpha branch.

Just putting this out here in case there is interest in taking the change upstream. I published this as @wnayes/electron-redux if anyone is interested.

wnayes avatar Jan 07 '24 23:01 wnayes