PHPackages                             dawen/config-to-js-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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. dawen/config-to-js-bundle

ActiveSymfony-bundle[Debugging &amp; Profiling](/categories/debugging)

dawen/config-to-js-bundle
=========================

Provides a command to dump defined config to js file

1.0.0(10y ago)16.3k1[1 PRs](https://github.com/da-wen/config-to-js-bundle/pulls)MITPHPPHP &gt;=5.5.0

Since Feb 4Pushed 8y agoCompare

[ Source](https://github.com/da-wen/config-to-js-bundle)[ Packagist](https://packagist.org/packages/dawen/config-to-js-bundle)[ RSS](/packages/dawen-config-to-js-bundle/feed)WikiDiscussions master Synced 1mo ago

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

config-to-js-bundle
===================

[](#config-to-js-bundle)

[![Build Status](https://camo.githubusercontent.com/b715da76f0411679c346da9871928989b787af407ea556c5e93cc5ee4bdd0d81/68747470733a2f2f7472617669732d63692e6f72672f64612d77656e2f636f6e6669672d746f2d6a732d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/da-wen/config-to-js-bundle)

Provides a command to dump defined config to js file.

---

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

[](#installation)

### Step 1: Composer

[](#step-1-composer)

Required in *composer.json*

```
   "dawen/config-to-js-bundle": "~1.0"
```

Run composer update dawen/config-to-js-bundle after modifiering composer.json file.

### Step 2: AppKernel

[](#step-2-appkernel)

In your *app/config/AppKernel.php* file you should activate the bundle by adding it to the array

```
    $bundles[] = new Dawen\Bundle\ConfigToJsBundle\ConfigToJsBundle();
```

### Step 3: Configuration

[](#step-3-configuration)

```
    config_to_js:
      type: 'module'
      output_path: '%kernel.root_dir%/../web/js/app-config.js'
      config:
        imageLocation: 'http://this-is-an-example.com/images'
        appVersion: '1.1.0'
```

If parameter are not defined, default values will be applied.

### Step 4: Run the command

[](#step-4-run-the-command)

Go to your console and run

```
    bin/console config:js:dump
```

---

Configuration Parameter Description
-----------------------------------

[](#configuration-parameter-description)

*type:*

possible values: module default value: module description: This defines for what the dumped code is optimized.

*output\_path:*

possible values: a valid string for a filepath default value: null description: This parameter defines a path and filename that will be created. If this value is not set, the dumper will throw an error.

*config:*

possible values: array default value: empty array description: Here you can create you config vars that should be availabe on your javascript side.

---

Supported Types/Renderers
-------------------------

[](#supported-typesrenderers)

*module:*Your file is includeable by module pattern like this: import appConfig from './ccurrent-folder/web/js/app-config.js'

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3748d ago

### Community

Maintainers

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

---

Top Contributors

[![da-wen](https://avatars.githubusercontent.com/u/3296502?v=4)](https://github.com/da-wen "da-wen (11 commits)")

---

Tags

symfonybundlejavascriptconfigdump

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dawen-config-to-js-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dawen-config-to-js-bundle/health.svg)](https://phpackages.com/packages/dawen-config-to-js-bundle)
```

###  Alternatives

[jolicode/gif-exception-bundle

The GhostBuster of your exception page

20596.8k](/packages/jolicode-gif-exception-bundle)[norberttech/aceeditor-bundle

Bundle that integrate excellent JavaScript ace editor into Symfony Form.

28310.8k](/packages/norberttech-aceeditor-bundle)

PHPackages © 2026

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