PHPackages                             jneyra/mvc-webpack-encore - 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. [Templating &amp; Views](/categories/templating)
4. /
5. jneyra/mvc-webpack-encore

ActiveLibrary[Templating &amp; Views](/categories/templating)

jneyra/mvc-webpack-encore
=========================

Twig Extension compatible with Symfony Webpack Encore (Symfony2), Stable

v1.0.1(4y ago)06PHPPHP &gt;=5.5

Since Oct 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/JonaNeyra/mvc-webpack-encore)[ Packagist](https://packagist.org/packages/jneyra/mvc-webpack-encore)[ RSS](/packages/jneyra-mvc-webpack-encore/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

mvc-webpack-encore
==================

[](#mvc-webpack-encore)

We can add a new frontend development folder based on new standards and patterns, these JS code snippets can be transpiled and compiled via Webpack.

Symfony Webpack Encore
----------------------

[](#symfony-webpack-encore)

This Package pretends to be able to give compatibility to add new JS code, This code can have multiple purposes, but the main one is to be a section where to put the frontend code.

Symfony Webpack Encore wasn't available until version 3.3, if you have older versions you can try to install this package.

### How to Install (Backend)

[](#how-to-install-backend)

Inside the folder project, you need to run the following command to install the package via Composer CLI

```
$ composer require jneyra/mvc-webpack-encore:dev-master
```

Then Install the package and add it to your vendor's folder with:

```
$ composer install
```

These commands shouldn't display an error if there are no incompatibilities with the project.

Finally, add the following configuration in `parameters.yml` and `services.yml` inside the project.

```
parameters:
    web_dir: '%kernel.root_dir%/../web' # You need to define the location of your public folder
    webpack_twig_tag: 'webpack_asset' # You need to add a new asset tag to use in your 'twig' that imports the JS code
```

> **Note:** *These definitions may change depending on how your project is structured.*

```
services:
    Jneyra\MvcWebpackEncore\Contracts\WebpackEncoreManifestLocatorInterface:
        alias: Jneyra\MvcWebpackEncore\Asset\WebpackEncoreManifestLocator
        public: true

    Jneyra\MvcWebpackEncore\Contracts\AssetHashInterface:
        alias: Jneyra\MvcWebpackEncore\Asset\AssetHash
        public: true

    Jneyra\MvcWebpackEncore\Asset\WebpackEncoreManifestLocator:
        class: Jneyra\MvcWebpackEncore\Asset\WebpackEncoreManifestLocator
        public: true
        arguments:
            - '%web_dir%'

    Jneyra\MvcWebpackEncore\Asset\AssetHash:
        class: Jneyra\MvcWebpackEncore\Asset\AssetHash
        public: true
        arguments:
            - '@Jneyra\MvcWebpackEncore\Asset\WebpackEncoreManifestLocator'
            - '%webpack_twig_tag%'

    Jneyra\MvcWebpackEncore\Twig\Extension\WebpackEncoreAsset:
        public: false
        class: Jneyra\MvcWebpackEncore\Twig\Extension\WebpackEncoreAsset
        arguments:
            - '@service_container'
        tags:
            - { name: twig.extension }
```

> **Note:** *In future updates you will no longer have to define all these services.*

### How to Install (Frontend)

[](#how-to-install-frontend)

You must create a folder inside the project where all the source code will go before transpiling with webpack

You must have NodeJS installed and manage the Encore Package:

Finally, Configure your Webpack File with your configs in your project

### Transpile Webpack Modes

[](#transpile-webpack-modes)

You need to install Webpack and compile your files, the compiled files will be saved in the public folder

```
$ npm i
```

> **Webpack Install**, this command runs once to install all necessary modules

```
$ npm run dev
```

> **Developer mode**, this command runs once and after the compilation output the bach is finished

```
$ npm run watch
```

> **Watch mode**, after the compilation output the bach will continue "listening" for the files changes

```
$ npm run prod
```

> *Production mode*\*, compiles applying clean minification on the code ready to production deploy

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

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

Every ~2 days

Total

2

Last Release

1664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11e3591193e96915c97ea4bdd8d8e0878b8b273f3e19cf2547dca877fd2ff9fe?d=identicon)[Jonathan Neyra](/maintainers/Jonathan%20Neyra)

---

Top Contributors

[![JonaNeyra](https://avatars.githubusercontent.com/u/76786720?v=4)](https://github.com/JonaNeyra "JonaNeyra (4 commits)")[![jneyra736](https://avatars.githubusercontent.com/u/65925584?v=4)](https://github.com/jneyra736 "jneyra736 (1 commits)")

### Embed Badge

![Health badge](/badges/jneyra-mvc-webpack-encore/health.svg)

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

###  Alternatives

[symfony/ux-twig-component

Twig components for Symfony

21814.8M161](/packages/symfony-ux-twig-component)[a2lix/auto-form-bundle

Automate form building

873.8M11](/packages/a2lix-auto-form-bundle)[iq2i/storia-bundle

UI Storia bundle

144.6k](/packages/iq2i-storia-bundle)

PHPackages © 2026

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