Skip to content

Commit bb33fba

Browse files
committed
feat(nuxt): Add warning when Netlify build discovered
1 parent df0d19a commit bb33fba

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/nuxt/src/module.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ export default defineNuxtModule<ModuleOptions>({
6969
if (serverConfigFile && serverConfigFile.includes('.server.config')) {
7070
addServerConfigToBuild(moduleOptions, nuxt, nitro, serverConfigFile);
7171

72+
consoleSandbox(() => {
73+
const serverDir = nitro.options.output.serverDir;
74+
75+
if (serverDir.includes('.netlify')) {
76+
// eslint-disable-next-line no-console
77+
console.warn(
78+
'[Sentry] Warning: The Sentry SDK discovered a Netlify build. The server-side Sentry support with ESM is experimental and may not work as expected. Please check out the docs for how to use Sentry on different deployment providers: https://docs.sentry.io/platforms/javascript/guides/nuxt/deployment-provider-setup/',
79+
);
80+
}
81+
});
82+
7283
if (moduleOptions.experimental_basicServerTracing) {
7384
addSentryTopImport(moduleOptions, nitro);
7485
} else {

0 commit comments

Comments
 (0)