简体   繁体   English

使用 babel 将 ES6 导入转换为 require.ensure?

[英]Transform ES6 imports into require.ensure with babel?

Is it possible with babel (or webpack or any other way) to transform all ES6 statements是否可以使用 babel(或 webpack 或任何其他方式)转换所有 ES6 语句

import X from Y;
/* file body */

into进入

require.ensure(['Y'], 
  function() { 
    /* file body */
  });

Or isn't it?或者不是吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM