plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

[chore] Replace require() with import/export

Open birkskyum opened this issue 1 year ago • 5 comments
trafficstars

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

  • #7111

birkskyum avatar Aug 19 '24 23:08 birkskyum

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

archmoj avatar Oct 03 '24 18:10 archmoj

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

gvwilson avatar Oct 03 '24 19:10 gvwilson

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

No. We don't have to.

archmoj avatar Oct 04 '24 13:10 archmoj

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

gvwilson avatar Oct 04 '24 13:10 gvwilson

👍 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?

archmoj avatar Oct 04 '24 14:10 archmoj