davidhirtz/yii2-vite

Vite integration for Yii 2 framework

Installs: 354

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

0.4.0 2024-07-29 20:59 UTC

This package is auto-updated.

Last update: 2024-10-29 21:35:19 UTC


README

Vite build option manifest is required to generate manifest.json file.

Default component configuration

'components' => [
    'vite' => [
        'class' => \davidhirtz\yii2\vite\components\Vite::class,
        'baseUrl' => '/dist/',
        'checkDevServer' => true,
        'devBaseUrl' => 'http://localhost:5173/',
        'devBaseUrlInternal' => null,
        'manifestPath' = '@webroot/dist/.vite/manifest.json',
        'useDevServer' = YII_ENV_DEV
    ],
],

Usage

Yii::$app->get('vite')->register('/resources/js/app.ts');