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

promise return by compileTemplate should handle err before any logic #353

Closed
vincent-ng opened this issue Jun 15, 2016 · 2 comments
Closed

Comments

@vincent-ng
Copy link
Contributor

html-webpack-plugin/lib/compiler.js:L71
should handle err before any logic. Otherwise the error stack will lost.

  return new Promise(function (resolve, reject) {
    childCompiler.runAsChild(function (err, entries, childCompilation) {
      if(err) {reject(err); return;} // handle err
      // Replace [hash] placeholders in filename
      var outputName = compilation.mainTemplate.applyPluginsWaterfall('asset-path', outputOptions.filename, {
        hash: childCompilation.hash,
        chunk: entries[0]
      });
      ...
    })
  }
@jantimon
Copy link
Owner

Sounds reasonable could you create a pull request?

@lock
Copy link

lock bot commented May 31, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants