Is there a plug-in that converts the ES6 modules of the entire project to commonjs while preserving the directory structure?

all I want is to convert the file into commonjs so that it can be easily referenced under node, instead of using webpack to package the whole project into the same file

babel has a plug-in for converting transform-es2015-modules-commonjs, but this plug-in can only read files, generate commonjs code, and cannot analyze dependencies between modules, so each file has to be transferred once

I would like to ask you, after I confirm the entry file, I can transcode all the dependencies into commonjs plug-ins?

you need to preserve the directory structure, instead of putting everything into a js package like webpack, and it"s best not to have extra code.

Mar.18,2021

babel can compile the entire directory
babel source-- out-dir es

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d41e-2c371.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d41e-2c371.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?