Skip to content

@sentry/integrations uses CommonJS for localforage breaking ESM compatibility #3401

@beaucollins

Description

@beaucollins

Package + Version

Version:

Description

Using require breaks ESM builds.

We're evaluating snowpack which requires all deps to be be ESM compatible. Everything in our project works except for @sentry/integrations.

Best we can tell it's due to using CommonJS's require:

const localForage = require('localforage');

image

Without being overly prescriptive it seems like the import * as localForageType from 'localforage'; could be used and no require is necessary.

import * as localForageType from 'localforage';

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