Skip to content

fix(@angular/cli): fix problem of SuppressPlugin in case entryFiles type is string - #7393

Merged
Brocco merged 2 commits into
angular:masterfrom
dcalsky:fix-suppress-plugin
Aug 17, 2017
Merged

fix(@angular/cli): fix problem of SuppressPlugin in case entryFiles type is string#7393
Brocco merged 2 commits into
angular:masterfrom
dcalsky:fix-suppress-plugin

Conversation

@dcalsky

@dcalsky dcalsky commented Aug 15, 2017

Copy link
Copy Markdown
Contributor

The type of entryFiles from entryPoint is array in webpack official suggested, but actually it could be string. default entryPonit seems like:

entry: {
  app: [__dirname + '/app.js']
}

but actually, entryPoint could be this:

entry: {
  app: __dirname + '/app.js'
}

This moment, our SuppressPlugin doesn't work. The error caused by every method which is only invoked by array, however entryFiles type is a string now.

Solution is, if entryFile is not array, make it as an array which includes just a single string element(itself).

…ype is string

The type of entryFiles from entryPoint is array in webpack official suggested, but actually it could be string. The error caused by `every` method which is only invoked by array, however entryFiles is a string. Solution: if entryFiles is not array, make it as an array which includes just a single string element.

@filipesilva filipesilva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Heya, thank you for fixing this. LGTM.

@Brocco
Brocco merged commit 6b115dc into angular:master Aug 17, 2017
Brocco pushed a commit that referenced this pull request Aug 17, 2017
…ype is string (#7393)

The type of entryFiles from entryPoint is array in webpack official suggested, but actually it could be string. The error caused by `every` method which is only invoked by array, however entryFiles is a string. Solution: if entryFiles is not array, make it as an array which includes just a single string element.
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this pull request Apr 23, 2018
…ype is string (angular#7393)

The type of entryFiles from entryPoint is array in webpack official suggested, but actually it could be string. The error caused by `every` method which is only invoked by array, however entryFiles is a string. Solution: if entryFiles is not array, make it as an array which includes just a single string element.
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants