2 ms·
Completely disagree on getting rid of .mjs, .mts, .cjs, etc. This has actually solved a lot of the problems we had of mixed module loading IMO
by replete 2y ago
Completely disagree on getting rid of .mjs, .mts, .cjs, etc. This has actually solved a lot of the problems we had of mixed module loading IMO
- WorldMaker 2y agoIt's probably going to be a bandaid for a while longer, but the problem is "mixed module loading" and we should fix that problem rather than rely on bandaids long term. The last .cjs file I've needed for a while now in type="module" libraries has been for eslint config files and eslint finally supports ESM configs. Everything is just .js, as it should be. I agree with the article that type="module" should be the default and once it is the well established default the bandaid of .mjs, .cjs, et al extensions should probably provoke a deprecation warning rather than being another long-term tech debt part of Node.