Skip to content

Commit 8a68fa9

Browse files
authored
fix(nuxt): Only wrap .mjs entry files in rollup (#14060)
fixes #14057 `@nuxt/content` adds entry files to rollup. This fix adds a check for `.mjs` to ignore other files in the rollup plugin.
1 parent 6cee1bf commit 8a68fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nuxt/src/vite/addServerConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function wrapEntryWithDynamicImport(resolvedSentryConfigPath: string): InputPlug
120120
return { id: source, moduleSideEffects: true, external: true };
121121
}
122122

123-
if (options.isEntry && !source.includes(`.mjs${SENTRY_WRAPPED_ENTRY}`)) {
123+
if (options.isEntry && source.includes('.mjs') && !source.includes(`.mjs${SENTRY_WRAPPED_ENTRY}`)) {
124124
const resolution = await this.resolve(source, importer, options);
125125

126126
// If it cannot be resolved or is external, just return it so that Rollup can display an error

0 commit comments

Comments
 (0)