Skip to content

Published package ships sourcemaps referencing missing source files #24

@StephenTangCook

Description

@StephenTangCook

Problem

The published npm package includes dist/*.js.map files whose sources entries reference TypeScript source files (e.g. ../src/*.ts) that are not included in the published package.

This causes warnings at runtime in environments that parse sourcemaps (e.g. workerd / Cloudflare Workers vitest integration tests):

Sourcemap for ".../node_modules/slack-cloudflare-workers/dist/index.js" points to missing source files

Expected behavior

Either:

  1. Include the src/ directory in the published package so the sourcemap references resolve, or
  2. Embed sources inline via sourcesContent in the .map files, or
  3. Don't ship .map files if the sources aren't available

Environment

  • slack-cloudflare-workers@1.3.9
  • workerd (via @cloudflare/vitest-pool-workers)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions