PHPackages                             ischenko/yii2-jsloader-systemjs - 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. ischenko/yii2-jsloader-systemjs

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

ischenko/yii2-jsloader-systemjs
===============================

An Yii2 extension that allows to handle asset bundles via systemjs

v1.0.1(6y ago)0904MITPHPPHP &gt;=7.1

Since Mar 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ischenko/yii2-jsloader-systemjs)[ Packagist](https://packagist.org/packages/ischenko/yii2-jsloader-systemjs)[ RSS](/packages/ischenko-yii2-jsloader-systemjs/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

yii2-jsloader-systemjs
======================

[](#yii2-jsloader-systemjs)

[![Latest Stable Version](https://camo.githubusercontent.com/09835b183dad853398d284eb622541f7a85ba2bbb87427b7050d0bcb3bc93da6/68747470733a2f2f706f7365722e707567782e6f72672f69736368656e6b6f2f796969322d6a736c6f616465722d73797374656d6a732f762f737461626c65)](https://packagist.org/packages/ischenko/yii2-jsloader-systemjs)[![Total Downloads](https://camo.githubusercontent.com/920fae34bd4df879592f5dd130716138f28e86a35aff5c80dbcbb225084035aa/68747470733a2f2f706f7365722e707567782e6f72672f69736368656e6b6f2f796969322d6a736c6f616465722d73797374656d6a732f646f776e6c6f616473)](https://packagist.org/packages/ischenko/yii2-jsloader-systemjs)[![Build Status](https://camo.githubusercontent.com/88325eec4370ae022fdc4f4d219fbeb895fb383f1477817a1c147469b0d1946a/68747470733a2f2f7472617669732d63692e636f6d2f69736368656e6b6f2f796969322d6a736c6f616465722d73797374656d6a732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ischenko/yii2-jsloader-systemjs)[![Code Climate](https://camo.githubusercontent.com/73ecca142ad61e87b9e456002ed5c1bc92b3fe13606382646f1ba8a61c3e4da8/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f69736368656e6b6f2f796969322d6a736c6f616465722d73797374656d6a732f6261646765732f6770612e737667)](https://codeclimate.com/github/ischenko/yii2-jsloader-systemjs)[![Test Coverage](https://camo.githubusercontent.com/817aac40fb038c6568f36ba416c58f8aec5608c3105d965a4fd206e6a14e02e3/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f69736368656e6b6f2f796969322d6a736c6f616465722d73797374656d6a732f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/ischenko/yii2-jsloader-systemjs/coverage)[![License](https://camo.githubusercontent.com/3680a40f2d621e4ffde7c46d292d2dc93523f7821f6b0e02889ab457a80583b9/68747470733a2f2f706f7365722e707567782e6f72672f69736368656e6b6f2f796969322d6a736c6f616465722d73797374656d6a732f6c6963656e7365)](https://packagist.org/packages/ischenko/yii2-jsloader-systemjs)

An Yii2 extension that allows to register asset bundles as [systemjs](https://github.com/systemjs/systemjs) modules.

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

[](#installation)

\*Requires PHP &gt;= 7.1

\*Requires [ischenko/yii2-jsloader](https://github.com/ischenko/yii2-jsloader) &gt;= 1.3

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require ischenko/yii2-jsloader-systemjs

```

or add

```
"ischenko/yii2-jsloader-systemjs": "*"
```

to the `require` section of your composer.json.

Usage
-----

[](#usage)

Add the [behavior](https://github.com/ischenko/yii2-jsloader#usage) and systemjs loader to the view configuration

```
    ...
    'components' => [
        ...
        'view' => [
            'as jsLoader' => [
                'class' => 'ischenko\yii2\jsloader\Behavior',
                'loader' => [
                    'class' => 'ischenko\yii2\jsloader\SystemJs',
                ]
            ]
        ]
        ...
    ]
    ...
```

Loader accepts the following options:

- **extras**: *array* a list of systemJs extras to load. Possible values are:
    - amd
    - transform
    - named-exports
    - named-register
    - global
    - module-types
- **minimal**: *boolean* indicates whether to load core version (s.js) or full version (system.js) of the library
- **position**: *integer* a position where the library and import map should be added to
- **renderer**: *string*|*array* configuration for the JS expressions renderer object

```
    ...
    'components' => [
        ...
        'view' => [
            'as jsLoader' => [
                'class' => 'ischenko\yii2\jsloader\Behavior',
                'loader' => [
                    'minimal' => false,
                    'extras' => ['amd'],
                    'position' => \yii\web\View::POS_HEAD,
                    'class' => 'ischenko\yii2\jsloader\SystemJs',
                ]
            ]
        ]
        ...
    ]
    ...
```

Нou can set alias, exports, init options from asset bundle:

```
class jQueryFireflyAsset extends AssetBundle
{
    public $js
        = [
            'jquery.firefly.min.js'
        ];

    public $jsOptions
        = [
            'systemjs' => [
                'alias' => 'jqff',
                'exports' => 'jquery_firefly'
            ]
        ];

    public $depends
        = [
            'yii\web\JqueryAsset',
        ];
}
```

Generated imports map will look as follows:

```
{
  "imports": {
    "jqff": "/pub/assets/dir/jquery.firefly.min.js"
  }
}
```

And JS code on the page will be wrapped by the following:

```
System.import("yii\\web\\JqueryAsset").then(function() {
    System.import("jqff").then(function(__sjs_module_1) {
        var jquery_firefly = __sjs_module_1.default;

        // page code goes here
    });
});
```

**Please note** that aliases works only within client-side code. On server-side you still need to operate with actual module names.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~15 days

Total

2

Last Release

2251d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1213046?v=4)[Roman Ishchenko](/maintainers/ischenko)[@ischenko](https://github.com/ischenko)

---

Top Contributors

[![ischenko](https://avatars.githubusercontent.com/u/1213046?v=4)](https://github.com/ischenko "ischenko (20 commits)")

---

Tags

viewyii2Behaviorassetssystemjs

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/ischenko-yii2-jsloader-systemjs/health.svg)

```
[![Health](https://phpackages.com/badges/ischenko-yii2-jsloader-systemjs/health.svg)](https://phpackages.com/packages/ischenko-yii2-jsloader-systemjs)
```

###  Alternatives

[ogheo/yii2-htmlcompress

Compress HTML output into a single line

20184.4k1](/packages/ogheo-yii2-htmlcompress)[raoul2000/yii2-bootswatch-asset

Use Bootswatch theme in your Yii application with minimum effort

2145.0k4](/packages/raoul2000-yii2-bootswatch-asset)[luyadev/luya-bootstrap4

Bootstrap4 Assets and Helper classes like ActiveForm for LUYA and Yii2.

1843.9k3](/packages/luyadev-luya-bootstrap4)[raoul2000/yii2-workflow-view

A simple widget to display your workflows

1638.8k20](/packages/raoul2000-yii2-workflow-view)

PHPackages © 2026

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