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

Issue #4099: ES6 Refactor for depdendencies/DepBlockHelpers.js #5098

Merged
merged 4 commits into from Jul 1, 2017
Merged

Issue #4099: ES6 Refactor for depdendencies/DepBlockHelpers.js #5098

merged 4 commits into from Jul 1, 2017

Conversation

KTruong008
Copy link
Contributor

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.

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

(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)})`;
Copy link
Member

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

@webpack-bot
Copy link
Contributor

@KTruong888 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

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(", ")}])`;
Copy link
Member

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.

@sokra sokra merged commit 42cdfed into webpack:master Jul 1, 2017
@sokra
Copy link
Member

sokra commented Jul 1, 2017

Thanks

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.

None yet

3 participants