DOKK / manpages / debian 12 / libmojolicious-plugin-assetpack-perl / Mojolicious::Plugin::AssetPack::Pipe::Fetch.3pm.en
Mojolicious::Plugin::AssetPack::Pipe::Fetch(3pm) User Contributed Perl Documentation Mojolicious::Plugin::AssetPack::Pipe::Fetch(3pm)

Mojolicious::Plugin::AssetPack::Pipe::Fetch - Fetch related assets

  use Mojolicious::Lite;
  plugin AssetPack => {pipes => [qw(Css Fetch)]};
  app->asset->process(
    "app.css" =>
      "https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"
  );

Mojolicious::Plugin::AssetPack::Pipe::Fetch will look for "url()" in a CSS file and fetch the resource from the remote location.

Note that this pipe is EXPERIMENTAL and subject for change.

See "process" in Mojolicious::Plugin::AssetPack::Pipe.

Mojolicious::Plugin::AssetPack.

2023-02-04 perl v5.36.0