Skip to content

Commit a508319

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

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
@@ -88,6 +88,17 @@ export default defineNuxtModule<ModuleOptions>({
8888
});
8989
}
9090

91+
consoleSandbox(() => {
92+
const serverDir = nitro.options.output.serverDir;
93+
94+
if (serverDir.includes('.netlify')) {
95+
// eslint-disable-next-line no-console
96+
console.warn(
97+
'[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/',
98+
);
99+
}
100+
});
101+
91102
if (moduleOptions.autoInjectServerSentry !== 'experimental_dynamic-import') {
92103
addServerConfigToBuild(moduleOptions, nuxt, nitro, serverConfigFile);
93104

0 commit comments

Comments
 (0)