Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Oct 2, 2024

This PR uses TSC to build both an ESM and CJS version of common and sdk-client.

I was going to use rollup for this, but removing rollup provides more debuggable code for non-browser cases. The browser build can do the minification.

file: file,
},
],
onwarn: (warning) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had copied this config and this onwarn thing was a big problem. First there should not be circular references, but second it meant the logging left out all the useful stuff. Like where the error happened. Which made all errors not useful at all.

LDIdentifyOptions,
Platform,
} from '@launchdarkly/js-client-sdk-common';
import { LDIdentifyOptions } from '@launchdarkly/js-client-sdk-common/dist/api/LDIdentifyOptions';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building the new way helps find these bad imports.

@kinyoklion kinyoklion closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants