Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在含有 “.” 符号的路径中, 无法如期生成 .min.js 到指定目录 #17

Open
CairLyq opened this issue Jun 21, 2022 · 1 comment

Comments

@CairLyq
Copy link

CairLyq commented Jun 21, 2022

背景

例如在项目包名字为 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
Copy link
Owner

AILHC commented Jul 14, 2022

背景

例如在项目包名字为 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,就会有问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants