Closed hduhdc closed 10 months ago
This is correct behavior. The modern output is ES2017: https://github.com/developit/microbundle#-modern-mode-
If you really need IE support, use CJS, ESM, or UMD outputs. Modern is specifically for dropping the baggage those formats ship with.
Please use English, I don't understand what you're trying to say.
Please use English, I don't understand what you're trying to say. I know my mistake,if my packge is foo,when i use
import foo from 'foo '
If the configuration of my package. json is as follows "exports": {
"default": "./lib/foo.js"
},
Is it possible to avoid using it by default ./lib/modern.mjs
打包后的产物 x.moduel.mjs 存在箭头函数,导致IE 无法兼容 Object.keys({name:1}).forEach(key => { console.log(key) }); 打包后结果
Object.keys({name:1}).forEach(e=>{console.log(e)}); //# sourceMappingURL=test-microbundle.modern.mjs.map