Skip to content

Build command in generated README.md does not work with Bun #614

Closed
@Hornwitser

Description

@Hornwitser

Describe the bug

When creating a project using bun create vue the generated readme contains the following instructions to run bun build in order to compile and minify the project.

### Compile and Minify for Production

```sh
bun build
```

But trying to run this gives a confusing error message

> bun build
bun build v1.1.34 (5e5e7c60)
error: Missing entrypoints. What would you like to bundle?

Usage:
  $ bun build <entrypoint> [...<entrypoints>] [...flags]

To see full documentation:
  $ bun build --help

This doesn't work because Bun has a built-in build command which gets executed instead of the build script defined in package.json.

Expected behavior

The generated readme uses bun run build instead, as this will run the build script instead of the built-in bun bundler.

How to reproduce

  1. Run bun create vue
  2. Accept all defaults
  3. Observe that vue-project/README.md mentions using bun build instead of bun run build
  4. Observe that running bun build gives an error message instead of invoking the build script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions