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

init command shoult use src/index.js as entry module by default #321

Closed
montogeek opened this issue Mar 8, 2018 · 6 comments
Closed

init command shoult use src/index.js as entry module by default #321

montogeek opened this issue Mar 8, 2018 · 6 comments

Comments

@montogeek
Copy link
Member

Feature

What is the current behavior?
init command does not provide a default value for entry module.

👉  ./node_modules/.bin/webpack init

ℹ INFO For more information and a detailed description of each question, have a look at https://github.com/webpack/webpack-cli/blob/master/INIT.md
ℹ INFO Alternatively, run `webpack(-cli) --help` for usage info.

? Will your application have multiple bundles? No
? Which module will be the first to enter the application? [example: './src/index']
>> Please specify an answer!

What is the expected behavior?

init command should provide a default value src/index.js as entry module following webpack itself approach to zero configuration

@dhruvdutt
Copy link
Member

Can we discuss this over #315 as it's quite related?

@evenstensberg
Copy link
Member

Actually we can leave it blank by default, as 0CJS can handle it

@evenstensberg
Copy link
Member

Just want to add that prompting that default is src/index is good to make sure users understand we're actually setting defaults.

@vijaykrishnavanshi
Copy link

Made a PR with this change.

@vijaykrishnavanshi
Copy link

Doing same for multiple bundle case also would be a good idea.
Thoughts?

@EugeneHlushko
Copy link
Member

I am not sure you want to add something that is already default, i actually omited it in one of my PR earlier: https://github.com/webpack/webpack-cli/pull/356/files#diff-1b2b84fcd9935ef62f04b2ffd905d2c6R86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants