Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.15.0
Framework Version
12.3.1
Link to Sentry event
No response
Steps to Reproduce
- In
next.config.js
, I addedtranspileClientSDK: true
option for supporting old browser users.
Expected Result
Sentry source code is transpiled to ES5
Actual Result
Sentry source code is not transpiled to ES5
Additional Resources
- I made a sinppet you can try right away.
- Instead of defining
newExclude
innextjs/src/config/webpack.ts:117
, below code is working for me (But I am not confident this code would work right in every places).
webpack: (config, options) => {
config.module.rules.push({
test: /\.+(js|jsx|mjs|ts|tsx)$/,
use: options.defaultLoaders.babel,
include: (filePath) => filePath.includes('@sentry'),
type: 'javascript/auto',
});
return config;
},