Skip to content

fix(serve): handle serve args as an array#1174

Merged
ematipico merged 2 commits intowebpack:nextfrom
knagaitsev:fix/serve-external-package
Jan 18, 2020
Merged

fix(serve): handle serve args as an array#1174
ematipico merged 2 commits intowebpack:nextfrom
knagaitsev:fix/serve-external-package

Conversation

@knagaitsev
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
Yes

If relevant, did you update the documentation?

Summary

I changed the args parameter to ...args, because I realized I overlooked this earlier. The problem is that spread syntax is used to pass the CLI args to the function, so I was only passing the first of these strings along to the argument parser. I added a test that involves more CLI flags to check this is fixed.

I'm not sure why serve tests and command were temporarily removed, was there a particular reason?

Also, I don't think adding this line was needed:

process.argv = process.argv.filter(arg => arg !== 'serve');

Does this PR introduce a breaking change?
No

Other information

@webpack-bot
Copy link
Copy Markdown

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

@ematipico ematipico merged commit 8aa1b7d into webpack:next Jan 18, 2020
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.

3 participants