-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
webpack-cli init creates invalid path for entry
unless you specify leading ./
or an abs. path
#162
Comments
webpack-cli init
creates invalid path for entry
unless you specify leading ./
or an abs. pathentry
unless you specify leading ./
or an abs. path
I'll leave this for the community to decide. Letting users supply path themselves is the most secure, as we dunno where either folder/location is. |
Okay I can see that, however, it seems to be a problem regardless that if I type What is the user expected to do here, enter |
@nilliams I think it's better for you to specify the entry with a relative/absolute path. https://webpack.js.org/configuration/entry-context:
So basically entry is a file(s) path, not a module name or anything else. |
Thanks, wasn't aware of
Currently entering the leading Sidenote on that: Typing a leading At a minimum, can I suggest the prompt question be changed to clarify this, it is currently:
Perhaps:
Optionally that Alternative solutions:
|
Actually you just have to type Let's just stick with adding an example. |
Sounds good to me, thanks! |
I'd like to give it a try |
Sweet! Ping me if you need help @avivr ! |
feat: add examples for single and multiple entries prompt (#162)
Hello guys, now that the example has been merged, I guess that we can close this issue? @ev1stensberg @nilliams |
Hmm, doesn't seem right? Single entry LGTM, but the examples for multiple entries seem incorrect.
Example should be multiple names, comma-separated, e.g. Then for the location question they suggest
Believe this should be: I also noticed that if you choose
|
Looks fine to me. Vendor as a entry name is commonly used, this may be an error with your code. Comment your config and let's see :) |
Sorry if my comment was not clear, but please can you reopen, as this is not resolved. The examples for multiple entry will create a broken config? (I'll create another issue for the |
@nilliams the entry prompts are just an example, you're free to choose whatever name you want. If you think this should be changed, send a PR, happy to help! (Also, it won't create a broken config ) If you're running init and creating a bundle in the dist folder that may be the case of your error. If you want to send in a PR with a fix, that would be 💯 |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
webpack-cli init
Answer
index.js
to the question'Which module will be the first to enter the application?'
.Then if you run
webpack
, fails with error:What is the expected behavior?
output.path
is handled, e.g.Ideally the question Yeoman asks should be more explicit about the input format it expects too, so I know to type
index.js
rather thanindex
.It should possibly also have a default of
index.js
? That might also help clarify the format too.Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.
The text was updated successfully, but these errors were encountered: