Skip to content

Release 2.3.0

Compare
Choose a tag to compare
@batopa batopa released this 06 Apr 10:09
· 184 commits to master since this release
53d2c5c

Add a more flexible way to load assets through specific stategies.

To load a strategy you should define in your app which strategy to use

use BEdita\WebTools\Utility\AssetRevisions;
use BEdita\WebTools\Utility\Asset\Strategy\EntrypointsStrategy;

AssetsRevisions::setStrategy(new EntrypointsStrategy());

There are two strategies at the moment:

  • RevManifestStrategy based on rev-manifest.json file generated by gulp-rev
  • EntrypointsStrategy based on the entrypoints.json file generated by Webpack Encore

But you can easily implements your custom strategy.

To load the proper assets you can use \BEdita\WebTools\View\Helper\HtmlHelper and its methods script(), css() and assets().