在含有 “.” 符号的路径中, 无法如期生成 .min.js 到指定目录
CairLyq opened this issue · comments
cair commented
背景
例如在项目包名字为 core1.1 下执行 egf build -f iife:core , 无法如期生成 .min.js 到指定目录
分析
node_modules@ailhc\egf-cli\libs\rollupdo.js LINE:376
outputOption.file = outputOption.file.replace(".", ".min.");
此代码未做 .js 文件名后缀识别 , 请修改为
outputOption.file = outputOption.file.replace(".js", ".min.js");
AILHC commented
背景
例如在项目包名字为 core1.1 下执行 egf build -f iife:core , 无法如期生成 .min.js 到指定目录
分析
node_modules@ailhc\egf-cli\libs\rollupdo.js LINE:376
outputOption.file = outputOption.file.replace(".", ".min.");
此代码未做 .js 文件名后缀识别 , 请修改为
outputOption.file = outputOption.file.replace(".js", ".min.js");
多谢,不过这个有别的考量,比如后缀不是.js,是mjs,就会有问题