Is there an existing issue for this?
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 added transpileClientSDK: 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 in nextjs/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;
},
References
Is there an existing issue for this?
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
next.config.js, I addedtranspileClientSDK: trueoption 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
newExcludeinnextjs/src/config/webpack.ts:117, below code is working for me (But I am not confident this code would work right in every places).References