Closed
Description
Type: Feature/bug
What is the current behavior?
- When using
init
command, we ask for an entry path file as an input for scaffolding but we don't check if any file actually exists at that path. - Also, we allow values like
"src/index"
instead of"./src/index"
which passes silently while scaffolding but causes errors at a later stage when webpack is executed.
What is the expected behavior?
- Check if the file and path exist when taking input, pop an error (if the file it doesn't exist) and ask for input again.
- Validate path and prefix
"./"
in cases when the input is"src/index"
. (Also validate path existence check after adding prefix)
Steps to reproduce
mkdir test-dir && cd test-dir;
webpack-cli init && webpack-cli --config webpack.prod.js
Affected question
Which module will be the first to enter the application? [example: './src/index']