Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM build of json-schema-tree has breaking call to require #22

Open
patrickshipe opened this issue Aug 7, 2023 · 0 comments
Open

ESM build of json-schema-tree has breaking call to require #22

patrickshipe opened this issue Aug 7, 2023 · 0 comments

Comments

@patrickshipe
Copy link

In the ESM build of this module there is a call to require that originates here:

const resolveAllOf = require('@stoplight/json-schema-merge-allof');

In an ES module, there is no require unless it is created with createRequire, causing this module to not be usable as ESM.

Context

The bug prevents the ESM code from being used. I override with the CJS code for now.

Current Behavior

ESM cannot be used.

Expected Behavior

ESM should be usable.

Possible Workaround/Solution

Use CJS version for now.

Steps to Reproduce

Import ESM build as ESM

Environment

Chrome 115, built using Vite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant