Skip to content

Commit 98c12a3

Browse files
authored
fix(nuxt): Delete Nuxt server template injection (#15749)
Follow-up for #15710 The server config was still processed by Nuxt (not only Nitro) because the file was imported in a plugin template. This code can be deleted now, as the Sentry server config should only be processed on the Nitro-side. fixes #15628
1 parent 57e9654 commit 98c12a3

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

packages/nuxt/src/module.ts

-12
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@ export default defineNuxtModule<ModuleOptions>({
6262
const serverConfigFile = findDefaultSdkInitFile('server');
6363

6464
if (serverConfigFile) {
65-
if (moduleOptions.autoInjectServerSentry !== 'experimental_dynamic-import') {
66-
addPluginTemplate({
67-
mode: 'server',
68-
filename: 'sentry-server-config.mjs',
69-
getContents: () =>
70-
// This won't actually import the server config in the build output (so no double init call). The import here is only needed for correctly resolving the Sentry release injection.
71-
`import "${buildDirResolver.resolve(`/${serverConfigFile}`)}";
72-
import { defineNuxtPlugin } from "#imports";
73-
export default defineNuxtPlugin(() => {});`,
74-
});
75-
}
76-
7765
addServerPlugin(moduleDirResolver.resolve('./runtime/plugins/sentry.server'));
7866
}
7967

0 commit comments

Comments
 (0)