PHPackages                             eren-seyfi/codeigniter-vite-plugin - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eren-seyfi/codeigniter-vite-plugin

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eren-seyfi/codeigniter-vite-plugin
==================================

Laravel-like @vite() helper for CodeIgniter 4

1.0.0(8mo ago)01MITPHPPHP &gt;=8.1

Since Dec 15Pushed 8mo agoCompare

[ Source](https://github.com/Eren-Seyfi/codeigniter-vite-plugin)[ Packagist](https://packagist.org/packages/eren-seyfi/codeigniter-vite-plugin)[ RSS](/packages/eren-seyfi-codeigniter-vite-plugin/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

 [![CodeIgniter](assets/codeIgniter.png)](assets/codeIgniter.png) [![Vite](assets/vitejs.png)](assets/vitejs.png)

⚡ CodeIgniter Vite Plugin
=========================

[](#-codeigniter-vite-plugin)

 [🇬🇧 English](#-english) • [🇹🇷 Türkçe](#-turkce)

---

🇬🇧 English
----------

[](#-english)

This plugin lets you include Vite-built CSS/JS assets in CodeIgniter 4 views in a **Laravel-like** way ✅

> ⚠️ **Note:** This is **not an official** package released by the CodeIgniter or Vite teams.
> It is a third-party library developed independently.

```
@vite(['resources/css/app.css', 'resources/js/app.js'])
```

---

### 📦 Installation

[](#-installation)

```
composer require eren-seyfi/codeigniter-vite-plugin
```

---

### 🚀 Usage

[](#-usage)

#### 1) 🧱 Generate Vite files

[](#1--generate-vite-files)

```
php spark vite:install
```

This command creates:

- ✅ `resources/js/app.js`
- ✅ `resources/css/app.css`
- ✅ `vite.config.mjs`

---

#### 2) ⚙️ Install Vite and build

[](#2-️-install-vite-and-build)

```
npm init -y
npm i -D vite
```

Add scripts to `package.json`:

```
"scripts": {
  "build": "vite build",
  "watch": "vite build --watch"
}
```

Build:

```
npm run build
```

💡 For auto rebuild during development:

```
npm run watch
```

---

#### 3) 🧩 Add it to your HTML

[](#3--add-it-to-your-html)

In your layout/view file, put this inside the **``** section:

```

    My CI4 App

    @vite(['resources/css/app.css', 'resources/js/app.js'])

    Hello 👋

```

🎉 That’s it!

---

🇹🇷 Türkçe
---------

[](#-türkçe)

CodeIgniter 4 projelerinde Vite ile build edilen CSS/JS dosyalarını **Laravel benzeri** şekilde view içine eklemeni sağlar ✅

> ⚠️ **Not:** Bu kütüphane CodeIgniter veya Vite ekibi tarafından yayınlanan **resmi bir paket değildir**.
> Bağımsız (third-party) bir geliştirici tarafından geliştirilmiştir.

```
@vite(['resources/css/app.css', 'resources/js/app.js'])
```

---

### 📦 Kurulum

[](#-kurulum)

```
composer require eren-seyfi/codeigniter-vite-plugin
```

---

### 🚀 Kullanım

[](#-kullanım)

#### 1) 🧱 Vite dosyalarını oluştur

[](#1--vite-dosyalarını-oluştur)

```
php spark vite:install
```

Bu komut şunları oluşturur:

- ✅ `resources/js/app.js`
- ✅ `resources/css/app.css`
- ✅ `vite.config.mjs`

---

#### 2) ⚙️ Vite’ı kur ve build al

[](#2-️-viteı-kur-ve-build-al)

```
npm init -y
npm i -D vite
```

`package.json` içine scripts ekle:

```
"scripts": {
  "build": "vite build",
  "watch": "vite build --watch"
}
```

Build al:

```
npm run build
```

💡 Geliştirirken otomatik build için:

```
npm run watch
```

---

#### 3) 🧩 HTML içine ekle

[](#3--html-içine-ekle)

Vite dosyalarını eklemek için layout/view dosyanda **`` içine** şunu yaz:

```

    My CI4 App

    @vite(['resources/css/app.css', 'resources/js/app.js'])

    Merhaba 👋

```

🎉 Hepsi bu!

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance61

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4370c3cb79c5280e0eb20d77204d258f3b570ce22df18104131be74b6b8f76ea?d=identicon)[eren\_seyfi](/maintainers/eren_seyfi)

---

Top Contributors

[![Eren-Seyfi](https://avatars.githubusercontent.com/u/45491369?v=4)](https://github.com/Eren-Seyfi "Eren-Seyfi (2 commits)")

### Embed Badge

![Health badge](/badges/eren-seyfi-codeigniter-vite-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/eren-seyfi-codeigniter-vite-plugin/health.svg)](https://phpackages.com/packages/eren-seyfi-codeigniter-vite-plugin)
```

###  Alternatives

[codeigniter4/appstarter

CodeIgniter4 starter app

1811.8M](/packages/codeigniter4-appstarter)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)[hermawan/codeigniter4-datatables

Serverside Datatables library for CodeIgniter4

10949.8k4](/packages/hermawan-codeigniter4-datatables)[jason-napolitano/codeigniter4-cart-module

A basic port of the codeigniter 3 cart module for CodeIgniter 4.

5915.6k](/packages/jason-napolitano-codeigniter4-cart-module)[maniaba/asset-connect

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application

1016.0k](/packages/maniaba-asset-connect)

PHPackages © 2026

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