Importing in `sentry.client/server.js` causes `Error: Aborted because ... is not accepted` error
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.21.0
Framework Version
Next.js v12.3.0
Link to Sentry event
No response
Steps to Reproduce
My Next.js project contains:
/sentry.server.config.js
/sentry.client.config.js
/sentry.common.config.js
<- my custom file having rules/hooks that both the server and client config share
With the /sentry.common.config.js
file, my terminal now throws: Error: Aborted because ./sentry.common.config.js is not accepted
errors.
I’d guess that sentry reserves the right for all sentry.*.config.js
files, where *
must be an accepted name and the file itself must initialize a sentry config.
I fail to find the above assumption in the documentation and am curious as to how else I then should create this common file? Furthermore, I’ve found several feature request issues asking for the possibility of moving the config files in folders and not pollute the root directory. However, having a whole /sentry
directory just for this single common config file seems unnecessary too.
Expected Result
N/A
Actual Result
N/A
Issue Analytics
- State:
- Created 9 months ago
- Reactions:1
- Comments:11 (6 by maintainers)
Not atm, most likely some webpack shenanigans.
Great! Any idea why this happens? ESM/CJS issue?