Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[chore] Replace require() with import/export #7119

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

Open
birkskyum opened this issue Aug 19, 2024 · 5 comments
Open

[chore] Replace require() with import/export #7119

birkskyum opened this issue Aug 19, 2024 · 5 comments
Labels
feature something new infrastructure build process etc. P2 considered for next cycle

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Aug 19, 2024

Newer tooling expect import/export, so gradually getting this sorted out will help with:

@gvwilson gvwilson added feature something new P2 considered for next cycle infrastructure build process etc. labels Aug 21, 2024
@archmoj
Copy link
Contributor

archmoj commented Oct 3, 2024

@gvwilson This requires extra refactoring. Let's keep it open.

@gvwilson
Copy link
Contributor

gvwilson commented Oct 3, 2024

Doesn't the move to esbuild mean we have to get rid of require() ?

@archmoj
Copy link
Contributor

archmoj commented Oct 4, 2024

Doesn't the move to esbuild mean we have to get rid of require() ?

No. We don't have to.

@gvwilson
Copy link
Contributor

gvwilson commented Oct 4, 2024

👍 How many more days of work do you think it will be to remove require() when the time comes?

@archmoj
Copy link
Contributor

archmoj commented Oct 4, 2024

👍 How many more days of work do you think it will be to remove require() when the time comes?

I think not only the require calls should be changed to import; but also the module export and type should change to ESM. Also the filenames may need to be converted from .js to .mjs. No?
That looks it require a couple of weeks.

@birkskyum Have you done similar change modernizing the mapbox > maplibre code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new infrastructure build process etc. P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

3 participants