Skip to content

Commit 9e509aa

Browse files
committed
feat(nuxt): Log server instrumentation might not work in dev
1 parent 54d286b commit 9e509aa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/nuxt/src/module.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ export default defineNuxtModule<ModuleOptions>({
7474

7575
nuxt.hooks.hook('nitro:init', nitro => {
7676
if (serverConfigFile && serverConfigFile.includes('.server.config')) {
77+
if (nitro.options.dev) {
78+
consoleSandbox(() => {
79+
// eslint-disable-next-line no-console
80+
console.log(
81+
'[Sentry] Your application is running in development mode. Note: @sentry/nuxt is in beta and may not work as expected on the server-side (Nitro).',
82+
);
83+
});
84+
}
85+
7786
if (moduleOptions.dynamicImportForServerEntry === false) {
7887
addServerConfigToBuild(moduleOptions, nuxt, nitro, serverConfigFile);
7988

0 commit comments

Comments
 (0)