Closed redevill closed 1 year ago
Hi, thanks for raising this. Yes sure, we can add ESM support. Could you expand a bit on what toolset you are using? For example does this occur when bundling? If so which bundler?
Express, Log4js, Typescript - need to double check on the bundling, as my environment manages both client and server side at the same time.
(Well (embarrassed look here) - my issues/errors were related to my Client side code picking up my logging class as a dependency.) This resulted in the original posted error, coming from webpack.
While an ESM compatible may still be useful for others, I am not bundling on my server... YET :) and the following works to hold the linter at bay: import * as correlator from 'correlation-id';
Thanks for the update. I agree that native would still be a useful addition
Any chance of an ESM (vs Common JS) compatible version?
Without this ESM, 'correlation-id'. CommonJS or AMD dependencies can cause optimization bailouts Not straightforward to make it work - Special polyfills needed.