PHPackages                             slouma2000/laravel-webpack-manifest - 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. slouma2000/laravel-webpack-manifest

ActivePackage

slouma2000/laravel-webpack-manifest
===================================

Package to use WebpackManifestPlugin in laravel

v0.1(6y ago)03MITPHPPHP &gt;=7.1CI failing

Since Jan 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/slouma2000/laravel-webpack-manifest)[ Packagist](https://packagist.org/packages/slouma2000/laravel-webpack-manifest)[ RSS](/packages/slouma2000-laravel-webpack-manifest/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel Webpack Assets
======================

[](#laravel-webpack-assets)

Package that allows you to include assets from json file, generated by [Webpack Manifest Plugin](https://github.com/danethurber/webpack-manifest-plugin)

 [![](https://camo.githubusercontent.com/a84572ae82a33587063f573e647a87bf647da0cf176ab62b35946736ebaaa49a/68747470733a2f2f7472617669732d63692e6f72672f6d616c79757368612f6c61726176656c2d7765627061636b2d6173736574732e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/a84572ae82a33587063f573e647a87bf647da0cf176ab62b35946736ebaaa49a/68747470733a2f2f7472617669732d63692e6f72672f6d616c79757368612f6c61726176656c2d7765627061636b2d6173736574732e7376673f6272616e63683d6d6173746572)

Installation
------------

[](#installation)

Require the latest version of package using [Composer](https://getcomposer.org/)

`$ composer require malyusha/laravel-webpack-assets`

Next, you need to add service provider into your `config/app.php` file in `providers` section:

- `\Malyusha\WebpackAssets\WebpackAssetsServiceProvider::class`

You can add the WebpackAssets facade in `facades` section:

- `'WebpackAssets' => \Malyusha\WebpackAssets\Facade::class`

Configuration
-------------

[](#configuration)

To change package configuration you need to publish configuration files:

`$ php artisan vendor:publish`

This will publish `assets.php` file inside your `config` directory. Configuration file has a few options:

- `file` - path to manifest.json file, relative to `public` directory;

Usage
-----

[](#usage)

Package provides helper functions to include script and style HTML elements inside blade templates:

- `webpack_script($script)` - will generate ``;
- `webpack_style($script`- will do the same as `webpack_script` but for style;
- `webpack($chunkName = null)` - will return instance of `Asset` class if no arguments provided, otherwise returns asset url with host.

Examples
--------

[](#examples)

Let's imagine, that you have generated `manifest.json` file with such content:

```
{
  "app.js": "/assets/1b53147322421b069bf1.js",
  "auth.background.png": "/assets/e60cc0de08eee2256222218425eaa943.png",
  "auth.login.css": "/assets/css/20a7e7e51e1f142b2b1f.css",
  "auth.login.js": "/assets/20a7e7e51e1f142b2b1f.js",
  "auth.password.forgot.css": "/assets/css/280c079c4407fbd0fdca.css",
  "auth.password.forgot.js": "/assets/280c079c4407fbd0fdca.js"
}
```

### Retrieving paths

[](#retrieving-paths)

```
$webpackAssets = webpack();
// Full urls with hostname
echo $webpackAssets->url('app.js'); // http://host.dev/assets/1b53147322421b069bf1.js
echo $webpackAssets->url('app.css'); // http://host.dev/assets/css/20a7e7e51e1f142b2b1f.css

// Relative paths
echo $webpackAssets->path('app.js'); // /assets/1b53147322421b069bf1.js
```

### Using in blade templates

[](#using-in-blade-templates)

Whenever you want to output your asset simply write:

```
{!! webpack_script('app.js') !!}

// or

{!! webpack()->image('background.png', 'Background') !!}
// Output:
```

### Raw file contents

[](#raw-file-contents)

When you need to add inline file content, such as css or js wrapped with `style` or `script` tags you can now use helper functions for that: `webpack_raw_style` and `webpack_raw_script`, or if in object - `webpack()->rawStyle()` and `webpack()->rawScript()`.

```
{!! webpack_raw_style('css/main.css') !!}

// or

{!! webpack()->rawStyle('css/main.css') !!}

// Will output
...content of main.css file...
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2305d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3be7b27d64920c5237b071c3c8c14d651066ddb5ba1d8d36973ce935b4f153d?d=identicon)[slouma2000](/maintainers/slouma2000)

---

Top Contributors

[![slouma2000](https://avatars.githubusercontent.com/u/1250556?v=4)](https://github.com/slouma2000 "slouma2000 (3 commits)")

---

Tags

laravelassetswebpackmixlaravel assetslaravel-webpack

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slouma2000-laravel-webpack-manifest/health.svg)

```
[![Health](https://phpackages.com/badges/slouma2000-laravel-webpack-manifest/health.svg)](https://phpackages.com/packages/slouma2000-laravel-webpack-manifest)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k124.3M624](/packages/barryvdh-laravel-debugbar)[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
