CrystalComputerCorp / smpte-timecode

JavaScript library for operations with SMPTE timecodes
MIT License
68 stars 24 forks source link

ESM Version? #39

Open timeimp opened 8 months ago

timeimp commented 8 months ago

Using smpte-timecode in an Angular 17 project is emitting this error:

Warning: file.ts depends on 'smpte-timecode'. CommonJS or AMD dependencies can cause optimization bailouts.

Is there a roadmap for an ESM version of this plugin or is there anything I can do to help get an ESM verison of smpte-timecode released?

m1tk4 commented 8 months ago

apologies for the delay. I don't really have Angular context as part of the test suite to test / fix this. If you can come up with a pull request that resolves it without breaking other stuff I would definitely consider and appreciate it. Thanks.

james-hu commented 6 months ago

Although I know ESM is the "future", currently we are in a chaotic era - CommonJS and ESM both exist and many tools have issues supporting them at the same time. However, my personal experience in recent years has been, CommonJS is still the one that has the best support. Several times I ran into issues with ESM packages, and I couldn't work around. That's also why many packages have both ESM and CommonJS releases. So that I would like to suggest keeping this package as CommonJS if there must be a choice. Angular 17 was just giving an warning, anyway.