Skip to content

Esbuild: plugin throws a warning when the entry point doesn't have a default export #25885

Closed

Description

@nikolovlazar

Environment

  • node: 23.9.0
  • esbuild: 0.25.5
  • @sentry/esbuild-plugin: 3.5.0

Steps to Reproduce

Just added the @sentry/esbuild-plugin:

import 'dotenv/config';
import esbuild from 'esbuild';
import { sentryEsbuildPlugin } from '@sentry/esbuild-plugin';

esbuild.build({
  entryPoints: ['index.ts'],
  sourcemap: true,
  bundle: true,
  minify: true,
  platform: 'node',
  outdir: 'dist',
  allowOverwrite: true,
  plugins: [
    sentryEsbuildPlugin({
      authToken: process.env.SENTRY_AUTH_TOKEN,
      org: process.env.SENTRY_ORG,
      project: process.env.SENTRY_PROJECT,
      sourcemaps: {
        filesToDeleteAfterUpload: ['**/*.js.map'],
      },
    }),
  ],
});

If I comment out the plugin the warning is not being displayed. My entry point index.ts file does not have any exports. It's an express.js app so I don't have anything to export.

Expected Result

Not see a warning

Actual Result

I'm getting the following warning when I'm running the build:

▲ [WARNING] Import "default" will always be undefined because there is no matching export in "index.ts" [import-is-undefined]

    index.ts?sentryProxyModule=true:4:44:
      4 │               export default OriginalModule.default;
        ╵                                             ~~~~~~~

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 5, 2025
  2. andreiborza commented on Jun 10, 2025

    @andreiborza
    Member

    Hi Lazar, thanks for filing this! Not sure when we'll get to this but this seems like a good first issue for potential outside contributors.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 10, 2025
  4. linear-code commented on Oct 29, 2026

    @linear-code
  5. added a commit that references this issue on Nov 6, 2026
    f5e5640
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions