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

Bug: specifying location of multi-entry app entrypoint fails #131

Closed
davekiss opened this issue May 9, 2017 · 2 comments
Closed

Bug: specifying location of multi-entry app entrypoint fails #131

davekiss opened this issue May 9, 2017 · 2 comments

Comments

@davekiss
Copy link

davekiss commented May 9, 2017

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Generating a multi-entry app via webpack-cli init errors out on step three, when prompted to enter the location of the first entry point.

If the current behavior is a bug, please provide the steps to reproduce.

webpack-cli init

? Will you be creating multiple bundles? Yes
? Type the name you want for your modules (entry files), seperated by comma admin.js, app.js
? What is the location of 'admin.js'? src

(node:64251) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: n[val].charAt is not a function
(node:64251) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

What is the expected behavior?

Input is accepted as valid

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.

webpack-cli -v
1.3.1

@evenstensberg
Copy link
Member

This is actually due that the .js extension is being parsed as an object property. Weird. Furthermore, I do not know if supplying an entry to your bundle name is a valid use case, as webpack prepends this to your bundle anyways.

Here's a screenshot of what I've got after running your code. Normally, this would be:

{
app: 'no'
}

Do you know if there's many people appending .js to their entries? Sounds to me like this is an anti-pattern. I'd be happy to fix this, but need to know if more people are using .js as entry names/chunk names.

@sokra

skjermbilde 2017-05-10 kl 00 59 26

@evenstensberg
Copy link
Member

Closing this for now. You should not use app.js or admin.js for entry point properties, those are antipatterns. Use app or admin. Happy to help you to elaborate on future issues! Cheers!

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

2 participants