-
Notifications
You must be signed in to change notification settings - Fork 278
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
feat: support output bundler unminified #772
base: master
Are you sure you want to change the base?
Conversation
filename: | ||
output.filename || `${getAutoBundleFilename(pkg.name)}.min.js`, | ||
// default to output dist | ||
path: output.path || 'dist/umd', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分还是可以继续放在公共配置里?
src/builder/config.ts
Outdated
const entryOutput = | ||
typeof outputConfig === 'object' | ||
? outputConfig | ||
: { path: outputConfig }; | ||
|
||
configs.push({ | ||
const unminifiedConfig = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果没有 generateUnminified
就没必要生成对应配置吧,感觉流程上还是这样清晰?
configs.push(/* 压缩配置 */);
if (generateUnminified) {
configs.push(/* 非压缩配置 */)
}
boilerplate/package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "create-father", | |||
"version": "4.5.0", | |||
"version": "4.5.1-beta.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个版本号是误提交的?
filename: output.filename | ||
? `${output.filename}.js` | ||
: `${defaultFileName}.js`, | ||
path: output.path || 'dist/umd', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个默认值还是写了多次;可以 bundlerConfig.output.path
有个默认值,后续各配置生成的时候优先取配置里的,兜底到默认值
No description provided.