2 ms·
Electron uses node and node support for es6 modules is new, and electron itself is just putting its toes in the water. Same with Typescript. Are you using .mts
by sroussey 5y ago
Electron uses node and node support for es6 modules is new, and electron itself is just putting its toes in the water. Same with Typescript. Are you using .mts .mtsx files?
- vorpalhex 5y agoNode support for ES6 modules has been out for years...
- josephg 5y agoEs modules are one of hundreds of features that have been added to javascript since es5. Others include typed arrays, promises, async/await, and so on. Babel configured to recompile code to es5 will polyfill all of those JS features. So the highly efficient V8 implementation of Uint8Array is replaced with slow javascript. Code using async await will be rewritten to use a promise polyfill and callbacks. And so on. The resulting code will be bigger and slower. Sometimes much slower depending on what it’s doing. List of features in each version of JS: https://kangax.github.io/compat-table/es2016plus/ https://kangax.github.io/compat-table/es2016plus/ (also check the ES6 tab)