setup.js is used by the jest testing framework to import the leaflet.js and mapml.js scripts from their built location in dist.<br/><br/>setup.js "imports" leaflet.js and mapml.js using the require("...") function, that I believe is part of the "CommonJS" module system, which pre-dates ES modules. CommonJS has been supported by node.js for a long time, apparently. There are many node.js libraries (like jest) that use CommonJS, so it will likely be supported forever. However the import-export syntax and behaviour is different between CommonJS and ES Modules, so that can be confusing.<br/><br/>Here's a SO question explaining a bit about the difference:<br/><br/>https://stackoverflow.com/a/46677972<br/><br/><br/><br/><br/><br/><br/>