nearform/playwright-firebase

Feature Request: Add CJS Support

barelyhuman opened this issue ยท 1 comments

The current library only supports working in ESM environments.
As firebase itself supports CJS environments, it'd be unfair to ignore it.

This issue is for feedback/discussion of the implementation.

Current State

Keep the library ESM first but compatible with CJS. Users can use async imports (await import("@nearform/playwright-firebase")) but I think we should still provision the general user

Possible Changes

  • Add another tsc compile step for CJS builds
  • Add in a esm folder and esm/package.json with "type":"module" to isolate
  • Add in exports to the root package.json to make sure general resolvers understand where to look
  • Change main to point to the dist folder
  • Make sure exports point to the esm folder for generic(default) rules as well

๐ŸŽ‰ This issue has been resolved in version 1.2.9 ๐ŸŽ‰

The release is available on:

Your optic bot ๐Ÿ“ฆ๐Ÿš€