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

feat(webpack-cli): allow multiple entry files #1619

Merged
merged 10 commits into from
Jun 17, 2020

Conversation

snitin315
Copy link
Member

@snitin315 snitin315 commented Jun 5, 2020

What kind of change does this PR introduce?
Feature

Did you add tests for your changes?
YES
If relevant, did you update the documentation?
YES
Summary
Now we can provide multiple entry files via CLI using -

  • webpack --entry=a.js --entry=b.js
  • webpack ./a.js ./b.js

Refers #717
Fixes #1454

Does this PR introduce a breaking change?

Other information

@snitin315 snitin315 requested a review from a team as a code owner June 5, 2020 03:56
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

We should not implement --multiple-flag, we should allow to run

webpack src/one.js src/two.js src/three.js

@snitin315
Copy link
Member Author

webpack src/one.js src/two.js src/three.js

@evilebottnawi we can do this for entry but what about other flags that can take multiple values?

@alexander-akait
Copy link
Member

@snitin315 Let's start with entry, it is most popular use case

@snitin315 snitin315 changed the title feat(webpack-cli): allow multiple entry flags feat(webpack-cli): allow multiple entry files Jun 7, 2020
@snitin315
Copy link
Member Author

Ready for review 🙌

@snitin315
Copy link
Member Author

@alexander-akait
Copy link
Member

/cc @webpack/cli-team

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

@webpack-bot
Copy link

@anshumanv Thanks for your update.

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

@rishabh3112 Please review the new changes.

@alexander-akait alexander-akait merged commit ac2e52c into webpack:next Jun 17, 2020
@snitin315 snitin315 deleted the feat/multi-entry branch June 27, 2020 12:03
@octaharon
Copy link

octaharon commented Feb 14, 2021

Hey lads. What about named entries? Webpack 4 allowed passing <name>=<request> as entry, as of now it doesn't seem to work, and "--entry" argument is treated like a filepath regardless of format. There seems to be no deprecation warning about it, will this functionality be restored?

@petemill
Copy link

petemill commented Dec 9, 2022

Hey lads. What about named entries? Webpack 4 allowed passing = as entry, as of now it doesn't seem to work, and "--entry" argument is treated like a filepath regardless of format. There seems to be no deprecation warning about it, will this functionality be restored?

Confirming this is broken now in webpack-cli. You cannot define an entry's name in the cli, preventing different compiled file names than entry file names, where this is possible in webpack config.

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.

8 participants