Skip to content

Commit be241f1

Browse files
committed
feat(nuxt): Add warning when Netlify build discovered
1 parent 9c55aa0 commit be241f1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/nuxt/src/module.ts

+11
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ export default defineNuxtModule<ModuleOptions>({
8484
});
8585
}
8686

87+
consoleSandbox(() => {
88+
const serverDir = nitro.options.output.serverDir;
89+
90+
if (serverDir.includes('.netlify')) {
91+
// eslint-disable-next-line no-console
92+
console.warn(
93+
'[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/',
94+
);
95+
}
96+
});
97+
8798
if (moduleOptions.dynamicImportForServerEntry === false) {
8899
addServerConfigToBuild(moduleOptions, nuxt, nitro, serverConfigFile);
89100

0 commit comments

Comments
 (0)