GoogleChromeLabs / tooling.report

tooling.report a quick way to determine the best build tool for your next web project, or if tooling migration is worth it, or how to adopt a tool's best practice into your existing configuration and code base.
https://tooling.report
Apache License 2.0
848 stars 49 forks source link

Test: Converting non-esm modules to esm #392

Closed frank-dspeed closed 3 years ago

frank-dspeed commented 3 years ago

create ESModules out of diffrent formarts so that you end up in a clean ESM Build.

I am at present focused on ESM Adoption and i found out that there are not much tools that can take a legacy code base into a current useable ESModule 98% of all packages do not even support running in ESM under NodeJS.

So the basline test should be take a CJS&TS code base using also webpack and get a working ESM Version out of it

at present i am working on Porting next.js to diffrent Engines and there i saw hugh problems to package the code base i needed to do a lot of tricks and hacks as they code for webpack and not for a platform.

Current State

To run Modules at present inside diffrent environments you need to shim the complet environment that the code was build for if you could manage it to get clean ESM versions from that code you could easy Reuse it and extend it while you need a lot of logic if your bound to CJS&WEBPACK as both are not the most ReuseAble Formarts.

jakearchibald commented 3 years ago

Isn't this covered by being able to load particular modules types https://bundlers.tooling.report/importing-modules/ and being able to output particular module types https://bundlers.tooling.report/output-module-formats/?

frank-dspeed commented 3 years ago

@jakearchibald i would say it is not well covered but your right it is maybe to hard to cover that in detail. i need to create a tool for that to inspect packages.