Search by

wexample / symfony-loader

weeger

A dynamic rendering system for Symfony

Package info

github.com/wexample/symfony-loader

pkg:composer/wexample/symfony-loader

Statistics

Installs: 1 586

Dependents: 42

Suggesters: 0

Stars: 0

Open Issues: 0

25.0.1 2026-10-22 17:02 UTC

README

Version: 25.0.1

A dynamic rendering system for Symfony

Table of Contents

Installation

JS helpers resolution

The webpack helper (src/Resources/js/webpack/encore.manifest.js) expects @wexample/js-helpers to be installed in the app.

For local dev containers, use link: in package.json:

{
  "devDependencies": {
    "@wexample/js-helpers": "link:/var/www/javascript-dev/wexample/js-helpers"
  }
}

Local JS packages (dev only)

To use local JS packages in development, configure them in config/packages/wexample_symfony_dev.yaml:

wexample_symfony_dev:
    js_dev_packages:
        - '/var/www/javascript-dev/wexample/*'

The glob * scans all subdirectories containing a package.json and automatically:

  • Adds webpack aliases via Encore.addAliases()
  • Adds TypeScript paths in tsconfig.json

Assets shipped by a PHP package

The assets/ directory of this package, and of every bundle built on it, is also an npm package (@wexample/symfony-loader, @wexample/symfony-design-system…). Declare those as link: in the app's package.json, never file::

"@wexample/symfony-loader": "link:vendor/wexample/symfony-loader/assets"

Yarn 1 copies a file: dependency, and the copy is what TypeScript falls back to when a file mapped by the tsconfig paths goes missing — errors then appear in files nobody edited. The full mechanism is written down in the symfony-design-system knowledge, page contributing/assets-as-npm-package.

Run

yarn install
yarn watch

The manifest and tsconfig are updated automatically.

wexample/symfony-loader

Version: 0.0.20

A dynamic rendering system for Symfony

Table of Contents

Installation

JS helpers resolution

The webpack helper (src/Resources/js/webpack/encore.manifest.js) expects @wexample/js-helpers to be installed in the app.

For local dev containers, use link: in package.json:

{
  "devDependencies": {
    "@wexample/js-helpers": "link:/var/www/javascript-dev/wexample/js-helpers"
  }
}

Local JS packages (dev only)

To use local JS packages in development, configure them in config/packages/wexample_symfony_dev.yaml:

wexample_symfony_dev:
    js_dev_packages:
        - '/var/www/javascript-dev/wexample/*'

The glob * scans all subdirectories containing a package.json and automatically:

  • Adds webpack aliases via Encore.addAliases()
  • Adds TypeScript paths in tsconfig.json

Run

yarn install
yarn watch

The manifest and tsconfig are updated automatically.