PHPackages                             humanmade/asset-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. humanmade/asset-loader

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

humanmade/asset-loader
======================

Utilities to seamlessly consume Webpack-bundled assets in WordPress themes &amp; plugins.

v0.8.0(2mo ago)28316.7k—3.4%3[10 issues](https://github.com/humanmade/asset-loader/issues)6GPL-2.0-or-laterPHPCI passing

Since Apr 19Pushed 2mo ago15 watchersCompare

[ Source](https://github.com/humanmade/asset-loader)[ Packagist](https://packagist.org/packages/humanmade/asset-loader)[ RSS](/packages/humanmade-asset-loader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (27)Used By (6)

Asset Loader
============

[](#asset-loader)

This plugin exposes functions which may be used within other WordPress themes or plugins to register and enqueue bundled script assets. It supports both [`wp-scripts`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/)-generated builds and custom Webpack configurations that output a JSON asset manifest.

[![Build Status](https://camo.githubusercontent.com/ca9b12a9e89139bb11d509d688ae482ba9734b8d41ae7f19253b00b71dc3da62/68747470733a2f2f7472617669732d63692e636f6d2f68756d616e6d6164652f61737365742d6c6f616465722e7376673f6272616e63683d6d61696e)](https://travis-ci.com/humanmade/asset-loader)

Usage
-----

[](#usage)

### Script Asset API (wp-scripts)

[](#script-asset-api-wp-scripts)

This plugin's primary public interface is for loading scripts built with `wp-scripts`. Use these functions for any `wp-scripts`-generated bundle that is not already auto-registered by `register_block_type_from_metadata()`. Dependencies and version information are read automatically from the `.asset.php` file generated alongside each bundle.

```
