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

fix: web inspect #66

Merged
merged 5 commits into from
Jun 28, 2023
Merged

fix: web inspect #66

merged 5 commits into from
Jun 28, 2023

Conversation

mater1996
Copy link
Contributor

No description provided.

@@ -108,7 +108,6 @@ module.exports.handleWebpackDone = function (err, stats, target) {
: 'successfully'
const result = []
if (hasErrors) result.push(extractResultFromStats(stats))
if (hasWarnings) result.push(extractErrorsFromStats(stats, 'warnings'))
if (!hasErrors) result.push(extractResultFromStats(stats))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 这个逻辑有点奇怪,hasErrors 不管是否为真,都执行了 result.push(...) 这个逻辑;
  2. hasWarning 这个逻辑去掉的原因是什么?

if (target.env) process.env.NODE_ENV = target.env
const res = resolveWebBuildWebpackConfig(api, options, args)
const output = toString(res, { verbose })
console.log(highlight(output, { language: 'js' }))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分的逻辑看起来和上面的 inpsect:mp 是一样的,可以抽出来?

@mater1996 mater1996 merged commit 4de73b6 into next Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants