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

use import instead of require #207

Open
Nabeeh-AlSawaf opened this issue Sep 26, 2022 · 1 comment
Open

use import instead of require #207

Nabeeh-AlSawaf opened this issue Sep 26, 2022 · 1 comment

Comments

@Nabeeh-AlSawaf
Copy link

Nabeeh-AlSawaf commented Sep 26, 2022

is it possible to change the require annotation into import annotation?

Context

I am using using Vite for my react application and vite doesn't really support require("your file") annotations resulting in an error in production :
ReferenceError: require is not defined
const eT=require("@stoplight/json-schema-merge-allof")

Current Behavior

right now the path @stoplight/json-schema-merge-allof is included using require statement and all if it's content is using require statement as well (not sure if there are other files affected)

Expected Behavior

use import instead of require

Possible Workaround/Solution

example : import "@stoplight/json-schema-merge-allof"

Steps to Reproduce

Environment

React Vite

@mattoni
Copy link

mattoni commented Sep 16, 2024

this is still happening. is this project dead?

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

2 participants