cdvcol/yii2-requirejs

Yii2 require.js

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

v0.4 2022-08-17 03:34 UTC

This package is not auto-updated.

Last update: 2025-03-27 14:46:41 UTC


README

just a bundled version of require.js to avoid random crap plugins conflicts

Install

composer require cacko\yii2-requireks

Usage

Cacko\Yii2\RequireJs\RequireJsAsset::register($view);

and then wrap your js code

((require, define, requirejs) => {
    require(['junk'], (Junk) => {
      ....
    });
})(__require.require, __require.define, __require.requirejs);