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
Issue #4099: ES6 Refactor for depdendencies/DepBlockHelpers.js #5098
Issue #4099: ES6 Refactor for depdendencies/DepBlockHelpers.js #5098
Conversation
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
lib/dependencies/DepBlockHelpers.js
Outdated
(outputOptions.pathinfo && depBlock.chunkName ? "/*! " + requestShortener.shorten(depBlock.chunkName) + " */" : "") + | ||
asComment(depBlock.chunkReason) + ")"; | ||
const chunk = chunks[0]; | ||
return `__webpack_require__.e${asComment(name)}(${JSON.stringify(chunk.id)}${outputOptions.pathinfo && depBlock.chunkName ? "/*! " + requestShortener.shorten(depBlock.chunkName) + " */" : ""}${asComment(depBlock.chunkReason)})`; |
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.
Try to move parts of the expression into a separate variable to avoid that long lines
@KTruong888 Thanks for your update. I labeled the Pull Request so reviewers will review it again. @sokra Please review the new changes. |
lib/dependencies/DepBlockHelpers.js
Outdated
return "__webpack_require__.e(" + JSON.stringify(chunk.id) + ")"; | ||
}).join(", ") + | ||
"])"; | ||
return `Promise.all${asComment(name)}(${pathAndChunkCheck ? "/*! " + shortenedChunkName + " */" : ""}[${chunks.map(chunk => "__webpack_require__.e(" + JSON.stringify(chunk.id) + ")").join(", ")}])`; |
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.
This line could be shorter too.
Thanks |
What kind of change does this PR introduce?
ES6 refactor of dependencies/DepBlockHelpers.js
Did you add tests for your changes?
Tests already written.
Summary
ES6 refactor as per issue #4099.