Skip to content

Unexpected behaviour for BuildEntry.pattern resolution #512

@LucDeCaf

Description

@LucDeCaf

Environment

https://stackblitz.com/edit/stackblitz-starters-sh4sv7bx

Reproduction

  1. Run pnpm install && pnpm run build
  2. Check dist - .env.local is included in the build folder when *.local files have been excluded

Describe the bug

Because dotfiles are usually ignored by unbuild, trying to ignore local files while using builder: 'copy' by using pattern: ['*', '.*', '!*.local'] doesn't work for local dotfiles - to ignore local dotfiles you need to use '!.*.local', which works for this example but doesn't work for all builds.

I believe the expected behaviour would be for '..local' files to be included in '.local', as this is the behaviour in most tools (eg. node and git).

Additional context

No response

Logs

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