Skip to content

@blaze(compile: false) Not Respected When Component Inside Optimized Directory #183

@EvilLooney

Description

@EvilLooney

Describe the bug
When configuring a directory to be optimized, we cannot exclude a component using @blaze(compile: false).

Component causing the issue

{-- Service Provider --}
Blaze::optimize()->in(resource_path('views/components'));
{-- views/components/some/nested/component.blade.php --}
@blaze(compile: false)
My disabled Blaze component

Expected behavior
The component should not be compiled by Blaze.

Actual behavior
The component is compiled to Blaze.

Environment

  • Laravel version: 13.13.0
  • PHP version: 8.5.5
  • Blaze version: 1.0.12

Additional context
The work-around is to specify the exclude in the Service Provider.

{-- Service Provider --}
Blaze::optimize()->in(resource_path('views/components'))->add(resource_path('views/components/some/nested'), false);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions