@sentry/nextjs `transpileClientSDK` options not work in yarn berry workspace environment
See original GitHub issueIs 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?
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;
},
References
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
run nestjs application with yarn berry workspace monorepo
I guess the configure packagesExtension in .yarnrc.yml can be a solution. But i don't know how to set it up. Any one can...
Read more >Plug'n'Play | Yarn - Package Manager
An overview of Plug'n'Play, a powerful and innovative installation strategy for Node.
Read more >Building a Monorepo with Yarn 2 - Heroku Blog
Yarn 2 is officially supported by Heroku. Here's a popular use case for Yarn enhanced by Yarn 2: using workspaces to manage dependencies...
Read more >Maël on Twitter: "7 The new `yarn workspaces foreach ...
2 But if you use PnP, and if a project doesn't list its dependencies, ... 7 The new `yarn workspaces foreach` command can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@codemilli Did you try to set the
experimental.externalDir
flag in next.config.js ?Hey thanks for writing in! @lobsterkatie is the expert on this so I’ll leave her to dig in further, but will take a look! If you manage to figure something out before hand, PRs are welcome!