PHPackages                             knpuniversity/webpack-encore-bundle - 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. knpuniversity/webpack-encore-bundle

Abandoned → [symfony/webpack-encore-bundle](/?search=symfony%2Fwebpack-encore-bundle)ArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

knpuniversity/webpack-encore-bundle
===================================

Integration with your Symfony app &amp; Webpack Encore!

10383PHP

Since Dec 3Pushed 7y ago4 watchersCompare

[ Source](https://github.com/knpuniversity/webpack-encore-bundle)[ Packagist](https://packagist.org/packages/knpuniversity/webpack-encore-bundle)[ RSS](/packages/knpuniversity-webpack-encore-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

WebpackEncoreBundle: Symfony integration with Webpack Encore!
=============================================================

[](#webpackencorebundle-symfony-integration-with-webpack-encore)

**WARNING** This bundle **IS NOT MAINTAINED** anymore, use [symfony/webpack-encore-bundle](https://github.com/symfony/webpack-encore-bundle)instead!!!

This bundle allows you to use the `splitEntryChunks()` feature from [Webpack Encore](https://symfony.com/doc/current/frontend.html)by reading an `entrypoins.json` file and helping you render all of the dynamic `script` and `link` tags needed.

Install the bundle with:

```
composer require knpuniversity/webpack-encore-bundle

```

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

[](#configuration)

If you're using Symfony Flex, you're done! The recipe will pre-configure everything you need in the `config/packages/webpack_encore.yaml`file:

```
# config/packages/webpack_encore.yaml
webpack_encore:
    # The path where Encore is building the assets - i.e. Encore.setOutputPath()
    output_path: '%kernel.public_dir%/build'

    # The public prefix to your assets that you normally use with the asset() function (e.g. build/) -
    # should match the "setManifestKeyPrefix()" value in webpack.config.js, if set.
    asset_path_prefix: 'build/'
```

Usage
-----

[](#usage)

First, enable the "Split Chunks" functionality in Webpack Encore:

```
// webpack.config.js
// ...
    .setOutputPath('public/build/')
    .setPublicPath('/build')
    .setManifestKeyPrefix('build/')

    .addEntry('entry1', './assets/some_file.js')

+   .splitEntryChunks()
// ...
```

When you enable `splitEntryChunks()`, instead of just needing 1 script tag for `entry1.js` and 1 link tag for `entry1.css`, you may now need *multiple*script and link tags. This is because Webpack ["splits" your files](https://webpack.js.org/plugins/split-chunks-plugin/)into smaller pieces for greater optimization.

To help with this, Encore writes a `entrypoints.json` file that contains all of the files needed for each "entry".

For example, to render all of the `script` and `link` tags for a specific "entry" (e.g. `entry1`), you can:

```
{# any template or base layout where you need to include a JavaScript entry #}

{% block javascripts %}
    {{ parent() }}

    {{ encore_entry_script_tags('entry1') }}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}

    {{ encore_entry_link_tags('entry1') }}
{% endblock %}
```

Assuming that `entry1` required two files to be included - `vendor~entry1~entry2.js`and `entry1.js`, then `encore_entry_script_tags()` is equivalent to:

```

```

The `build/` public prefix to your assets is set in the config file.

If you want more control, you can use the `encore_entry_js_files()` and `encore_entry_css_files()` methods to get the list of files needed, then loop and create the `script` and `link` tags manually.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 82.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8aa57faf031af6d7f14a231d38adf1aed19844770fb5de2f82dc61aa65b45111?d=identicon)[weaverryan](/maintainers/weaverryan)

---

Top Contributors

[![weaverryan](https://avatars.githubusercontent.com/u/121003?v=4)](https://github.com/weaverryan "weaverryan (14 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (3 commits)")

---

Tags

bundlesymfonysymfony-bundlewebpack

### Embed Badge

![Health badge](/badges/knpuniversity-webpack-encore-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/knpuniversity-webpack-encore-bundle/health.svg)](https://phpackages.com/packages/knpuniversity-webpack-encore-bundle)
```

###  Alternatives

[magenest/module-popup

Popup extension by Magenest

138.4k](/packages/magenest-module-popup)

PHPackages © 2026

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