gmedia/hash-resource-finder

Last activity 03 Sep 2019 258
composer require gmedia/hash-resource-finder

Finds js, css, and other resource files while ignoring the hash.

1.0.4

Version
1.0.4
Type
neos-plugin
Release Date
Sep 03, 2019 14:42
Source
git
Distribution
zip
712b79efb2f52faa347ad33588474d2ed103c5eb

Hash Resource Finder

This package for Flow and Neos helps linking and embedding CSS and JavaScript resource files that have a hash in their filename.

It is recommended to use this package with Webpack. The following filename format is accepted: [name].[hash].[ext] The helper looks (with PHPs glob function) for a given filename pattern, but it can only find one file! So you need to set up your Webpack config in a way that it clears the output folder before building the file.

Basics

All output files must be saved in Resources/Public/Compiled. Any other folders are not available at the moment.

Example for a file structure:

- Resources/Public/Compiled
    - app.42ef132c667d635cd64c.js
    - style.ec1c0f2da1613bbf27cb75f92ae5bf8a.css

If your file structure looks like this, you can use app.js as well as style.css as filename patterns for this package. The helper class will return the first file that matches the pattern without the hash.

Use in Fusion

CSS-Link Tag

The content of the readme is provided by Github
The same vendor provides 9 package(s).