Skip to content

Improve vue build help (facing a "Failed to locate entry file" error) #2473

Closed
@cmermingas

Description

@cmermingas

What problem does this feature solve?

After creating a project with the cli, I cd into the project folder and run vue build, only to get a Failed to locate entry file error. When I try run vue build --help, I get this:

$ vue build --help

  Usage: build [options] [entry]

  build a .js or .vue file in production mode with zero config

  Options:

    -t, --target <target>  Build target (app | lib | wc | wc-async, default: app)
    -n, --name <name>      name for lib or web-component mode (default: entry filename)
    -d, --dest <dir>       output directory (default: dist)
    -h, --help             output usage information

That optional entry argument is not document. Since it's optional, I was not providing. Turns out that running vue build ./src/main.js works.

What does the proposed API look like?

It would be great if the use of the optional entry argument was explained in the cli help or if the cli could automatically figure it out, perhaps by reading the entry from the cli-controlled webpack config:

  entry: {
    app: [
      './src/main.js'
    ]
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions