在rollup.config.js里,不知道哪个视频加了这个代码(我肯定是看漏了)
babel({
exclude: 'node_modules/**',
runtimeHelpers: true,
plugins: [
['@babel/transform-runtime', {
regenerator: true
}]
]
})
这里的plugin是什么用的?
如果我不加,我打包后文件就去除空节点
比如
<div>
<div>11111</div>
<div></div>
<div>
会编译成
<div></div>
对比了git仓库,发现就是babel的plugin插件的事
所以那段代码是干什么的呢?