Skip to content

@sentry/core is marked as being side effect free but it is not #16846

Closed
@timfish

Description

@timfish

Description

"sideEffects": false,

Our build output contains imports where Rollup detects side effects:
Image

But time.ts is the most obvious place:

export const timestampInSeconds = createUnixTimestampInSecondsFunc();

Our current build output gives warning with Cloudflare's Wranger:

▲ [WARNING] Ignoring this import because "../../../../packages/core/build/esm/utils/time.js" was marked as having no side effects [ignored-bare-import]

    ../../../../packages/core/build/esm/trpc.js:8:7:
      8 │ import './utils/time.js';
        ╵        ~~~~~~~~~~~~~~~~~

  "sideEffects" is false in the enclosing "package.json" file:

    ../../../../packages/core/build/esm/package.json:1:36:
      1 │ {"type":"module","version":"9.35.0","sideEffects":false}
        ╵                                     ~~~~~~~~~~~~~

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