Skip to content

Missing source files in npm package cause sourcemap warnings #106

@ytakahashi

Description

@ytakahashi

Hi, thank you for the great library.
When using ssh-config (v5.1.0) with modern bundlers/test runners like Vite or Vitest, the following warnings are displayed:

Sourcemap for ".../node_modules/ssh-config/lib/ssh-config.js" points to missing source files
Sourcemap for ".../node_modules/ssh-config/lib/glob.js" points to missing source files

This happens because the .js.map files are included in the npm package, but the original source files they refer to are not included in the files field of package.json.

Suggested Fix:

  • Include the source files in the npm package by adding them to the files field.
  • Or, configure the build to include sourcesContent in the sourcemaps.
  • Or, disable sourcemap generation in the build script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions