You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context, I'm using NextJS and following the instructions here to instrument the @splunk/otel-web package. While using @next/bundle-analyzer, I noticed that the @splunk/otel-web/dist/cjs files are being pulled in. I was hoping to see the @splunk/otel-web/dist/esm files being used so that Webpack can tree shake off the modules that @splunk/otel-web is not using.
For context, I'm using NextJS and following the instructions here to instrument the
@splunk/otel-web
package. While using@next/bundle-analyzer
, I noticed that the@splunk/otel-web/dist/cjs
files are being pulled in. I was hoping to see the@splunk/otel-web/dist/esm
files being used so that Webpack can tree shake off the modules that@splunk/otel-web
is not using.It looks like the reason the CJS files are being used is because Webpack checks the
browser
field of thepackage.json
first by default and currently it contains:I was wondering if the team would be open to:
browser
field to point todist/esm/index.js
browser
tomain
browser
vsmodule
fields inpackage.json
webpack/webpack#4674I'm happy to open a PR.
The text was updated successfully, but these errors were encountered: