babel插件将动态导入转换为静态导入 将动态导入转换为静态导入的转换 安装: npm install babel-plugin-transform-dynamic-imports-to-static-imports 用法: 带有配置文件: { " plugins " : [ " babel-plugin-transform-dynamic-imports-to-static-imports " ] } 通过CLI babel --plugins babel-plugin-transform-dynamic-imports-to-static-imports script.js 通过节点API require ( "@babel/core" ) . transform ( "code" , { plugins : [ "babel-plugin-transform-dyna