Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support web builds #137

Merged
merged 14 commits into from
Nov 7, 2023
Merged

Support web builds #137

merged 14 commits into from
Nov 7, 2023

Conversation

arendjr
Copy link
Collaborator

@arendjr arendjr commented Oct 31, 2023

Okay, this was a bit more involved again than I'd hoped. But! We have first-class web builds now... at least in the NPM packages. What this PR does:

  • Replaces dnt with rollup. While dnt was a great starting point, and is certainly easier out-of-the-box, we didn't really use their shimming abilities anyway and rollup gives us the flexibility to more easily build dedicated web builds. Also, the packages are now smaller, since everything gets bundled into single-file builds.
  • Introduced $otel/* imports. This makes it a lot easier to upgrade the OpenTelemetry libs, since the version numbers aren't hardcoded all over the place anymore.
  • @keturiosakys's fix for getting caller info in line with the Autometrics spec are also included, as are tests for the caller info.
  • Fixes the issues we had with AsyncLocalStorage.
  • react-app-experimental is now also included in the builds and type-checking.
  • just clean is a bit more thorough, by also removing node_modules and .yarn where applicable.

Resolves #89, #100, #133 and #134.

@@ -0,0 +1,3 @@
const fetch = global.fetch;

export { fetch };
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this to a separate file so that we can easily replace the file with node-fetch-native when building the Node bundles.

@arendjr arendjr merged commit a0ea222 into main Nov 7, 2023
1 check passed
@arendjr arendjr deleted the support-web-builds branch November 7, 2023 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants