-
-
Notifications
You must be signed in to change notification settings - Fork 620
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
bugfix - sets the default entry point if not provided #268
Conversation
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
@@ -95,6 +95,14 @@ exports[`entry transforms correctly using "entry-0" data 12`] = ` | |||
" | |||
`; | |||
|
|||
exports[`entry transforms correctly using "entry-0" data 13`] = ` | |||
"module.exports = { | |||
entry: module.exports = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup ideally an empty object should work no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correction: an empty config object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm testing the wrong thing - this is the yeoman transformation test snapshot.
55a6067
to
a4cc5fa
Compare
Codacy looks to be a flake when I look at it, Ship it.gif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of setting a default here, which webpack/webpack@WebpackOptionsDefaulter.js
Let's instead just remove the check that validates the existence of options.entry entirely. So tl;dr webpack-cli doesn't warn, or prevent webpack-dev-server from running webpack without an entry provided.
Am I missing something there?
Turns out the issue lies with the Closing this PR. |
What kind of change does this PR introduce?
Sets the default entry point to
./src
if it isn't provided in the webpack config (or if no config is provided at all).Did you add tests for your changes?
No, there's no test coverage of
convert-argv.js
If relevant, did you update the documentation?
No, as this is covered by the normal webpack documentation.
Summary
When trying to run
webpack-dev-server
with no config file or no entry set, it did not default to./src
like the webpack compiler does.It solves this issue - webpack/webpack-dev-server#1308
Does this PR introduce a breaking change?
No