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 small mistakes in shared-entry-concat-plugin.js and validator.js #485

Merged
merged 1 commit into from
Jan 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/config/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ class Validator {
module.exports = function(webpackConfig) {
const validator = new Validator(webpackConfig);

validator.validate(webpackConfig);
validator.validate();
};
2 changes: 1 addition & 1 deletion lib/webpack/shared-entry-concat-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getChunkFilename(compilation, chunkName) {
function getAssetSource(asset) {
let content = asset.source();
if (Buffer.isBuffer(content)) {
content = Buffer.toString('utf-8');
content = content.toString('utf-8');
Copy link
Member

Choose a reason for hiding this comment

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

This worked before somehow? Or, maybe being a Buffer is some edge-case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, most of the time it probably doesn't go into that if (not sure what triggers it).

However if it did the build would not fail (since Buffer.toString('utf-8') does return a JS string) but the generated file wouldn't work either... I don't think I've seen someone post an issue that could be related to that though.

}

return content;
Expand Down