Skip to content

Assets and manifests simplification #55

Description

@thekid

Current typical code:

// Cache static assets for one week, immutable fingerprinted assets for one year
$manifest= new AssetsManifest($this->environment->path('src/main/webapp/assets/manifest.json'));
$assets= new AssetsFrom($this->environment->path('src/main/webapp'))->with(fn($file) => [
  'Cache-Control' => $manifest->immutable($file) ?? 'max-age=604800, must-revalidate'
]);

Can we simplify the fn($file) => ... boilerplate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Fields

    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