PHPackages                             mihatori/codeignitervite - 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. mihatori/codeignitervite

ActiveLibrary

mihatori/codeignitervite
========================

Integrate viteJs in codeiginter4 framework

v1.1.1(3y ago)974.0k↑157.1%12[5 issues](https://github.com/firtadokei/codeigniter-vitejs/issues)[1 PRs](https://github.com/firtadokei/codeigniter-vitejs/pulls)MITPHPPHP ^7.4 || ^8.0CI failing

Since Jul 9Pushed 2y ago4 watchersCompare

[ Source](https://github.com/firtadokei/codeigniter-vitejs)[ Packagist](https://packagist.org/packages/mihatori/codeignitervite)[ Docs](https://github.com/firtadokei/codeigniter-vitejs)[ RSS](/packages/mihatori-codeignitervite/feed)WikiDiscussions master Synced today

READMEChangelog (10)DependenciesVersions (13)Used By (0)

 [![](src/logo.png)](src/logo.png)Codeigniter + viteJs
====================

[](#codeigniter--vitejs)

Vitejs Integration For Codeigniter4

 [ ![](https://camo.githubusercontent.com/63a47ceafd7d613df31e037d57a9c41701c81eabc6fb8e7979b4cf28bf996398/68747470733a2f2f637573746f6d2d69636f6e2d6261646765732e6865726f6b756170702e636f6d2f6769746875622f762f72656c656173652f6669727461646f6b65692f636f646569676e697465722d766974656a733f6c6f676f3d746167) ](https://github.com/firtadokei/codeigniter-vitejs/releases) [![](https://camo.githubusercontent.com/1667baa3145a7b9b2a0ae17d8c7b09b4d471f79aa02b0615ab07d64d9988a198/68747470733a2f2f617765736f6d652e72652f6d656e74696f6e65642d62616467652e737667)](https://github.com/vitejs/awesome-vite#codeigniter)[![](https://camo.githubusercontent.com/4b3e9696e091d14007b77a99cd2359328e280e348a3295dcbc8204af74dcf152/68747470733a2f2f637573746f6d2d69636f6e2d6261646765732e6865726f6b756170702e636f6d2f7061636b61676973742f73746172732f6d696861746f72692f636f646569676e69746572766974653f6c6f676f3d73746172)](https://camo.githubusercontent.com/4b3e9696e091d14007b77a99cd2359328e280e348a3295dcbc8204af74dcf152/68747470733a2f2f637573746f6d2d69636f6e2d6261646765732e6865726f6b756170702e636f6d2f7061636b61676973742f73746172732f6d696861746f72692f636f646569676e69746572766974653f6c6f676f3d73746172) [ ![](https://camo.githubusercontent.com/45ba1073f06170bf0f451f1b1ff4dfb844ef7f3ec73de1ea97d68faf1ca9dc5b/68747470733a2f2f6261646765732e686970746573742e636f6d2f7061636b61676973742f64742f6d696861746f72692f636f646569676e69746572766974653f636f6c6f723d253233633730306666266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d253233633730306666) ](https://packagist.org/packages/mihatori/codeignitervite) [ ![](https://camo.githubusercontent.com/07c2e44558e1b5408c38ae82f4a2e29699f434696d366a134f362944f9e95621/68747470733a2f2f637573746f6d2d69636f6e2d6261646765732e6865726f6b756170702e636f6d2f7061636b61676973742f6c2f6d696861746f72692f636f646569676e69746572766974653f6c6f676f3d6c6177) ](LICENSE)

Codeigniter vite is a package that aims to integrate [vitejs](https://vitejs.dev/) with [codeigniter4](https://codeigniter.com/) in a simple way.

Features:
---------

[](#features)

- ⏱️ Almost zero configuration
- 🧩 Easy to install and remove
- 🔨 Easy to customize
- ✌️ Support most used frameworks: `react`, `vue`, and `svlete`. (check [v2](https://github.com/firtadokei/codeigniter-vitejs/tree/v2) for SvelteKit support)
- 🔥 Enjoy hot module replacement (HMR)

Installation:
-------------

[](#installation)

```
composer require mihatori/codeignitervite

```

then from your project root, run:

```
php spark vite:init --framework

```

replace `` with `vue`, `react`, `svelte`, or `none`

or you can just run:

```
php spark vite:init

```

our buddy `spark` will handle the rest for you 🙃

Getting Started:
----------------

[](#getting-started)

- Install your node dependencies: `npm install`
- Start vite server: `npm run dev`
- Start CI server: `php spark serve` or access it through your virtual host.
- That's all =)

> **NOTE:**
>
> `npm run dev` is not where you should work, it main purpose is to serve assets, such as scripts or stylesheets. once you build your files, it becomes useless but as long as it running, the package will use it instead of the bundled files. So make sure to **access your project** from ci server or a vitual host.

Build your files:
-----------------

[](#build-your-files)

to bundle your files, run:

```
npm run build

```

this command will generate the bundled assets in your public directory. but as we said before, as long as vite server is running, the package will use it instead of bundled files, so make sure to stop it when you're done developing.

Uninitialize:
-------------

[](#uninitialize)

`composer remove mihatori/codeignitervite` command will remove the package, but the generated files will remain there (package.json, vite.config.js ...etc). so to avoid that, make sure to run the following command first:

```
php spark vite:remove

```

This command will do the following:

- delete `package.json`, `packages.lock.json` and `vite.config.js`.
- delete `resources` folder.
- And finally restore your `.env` file.

🔥 Need a quick start?
---------------------

[](#-need-a-quick-start)

Check out our starter apps for [svelte](https://github.com/firtadokei/ci-svelte-appstarter) and [vue](https://github.com/firtadokei/ci-vue-appstarter).

[ ![](https://github.com/firtadokei/ci-svelte-appstarter/raw/master/ci-svelte.webp)](https://github.com/firtadokei/ci-svelte-appstarter)[ ![](https://github.com/firtadokei/ci-vue-appstarter/raw/master/ci-vue.webp)](https://github.com/firtadokei/ci-vue-appstarter)Contributing
------------

[](#contributing)

All contributions are welcome, it doesn't matter whether you can code, write documentation, or help find bugs. feel free to use issues or pull requests.

Support
-------

[](#support)

Unfortunately, I don't drink coffee 💔, but you can star it instead 🙃

License
-------

[](#license)

MIT License © 2022 [Mihatori Kei](https://github.com/firtadokei)

###  Health Score

36

↑

LowBetter than 82% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.8% 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 ~12 days

Recently: every ~28 days

Total

12

Last Release

1222d ago

Major Versions

v1.0.7 → v2.0.0-beta2022-08-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/5abb0fc0b4b55584e47142e9a1022469d91afc2c2425df82673df7b985943cb8?d=identicon)[mihatori](/maintainers/mihatori)

---

Top Contributors

[![mihatorikei](https://avatars.githubusercontent.com/u/87876485?v=4)](https://github.com/mihatorikei "mihatorikei (97 commits)")[![jaguarch](https://avatars.githubusercontent.com/u/109637629?v=4)](https://github.com/jaguarch "jaguarch (10 commits)")[![Gildedter](https://avatars.githubusercontent.com/u/93777256?v=4)](https://github.com/Gildedter "Gildedter (1 commits)")

---

Tags

bundlercodeignitercodeigniter4reactreactjssveltesveltejsvitevitejsvuevuejscodeignitercodeigniter4codeigniter-viteJscodeigniter-vueJscodeigniter-reactJscodeigniter-svelteJscodeigniter spa

### Embed Badge

![Health badge](/badges/mihatori-codeignitervite/health.svg)

```
[![Health](https://phpackages.com/badges/mihatori-codeignitervite/health.svg)](https://phpackages.com/packages/mihatori-codeignitervite)
```

###  Alternatives

[codeigniter4/shield

Authentication and Authorization for CodeIgniter 4

417356.1k17](/packages/codeigniter4-shield)[codeigniter4/settings

Settings library for CodeIgniter 4

94478.9k19](/packages/codeigniter4-settings)[kenjis/codeigniter-ss-twig

A Simple and Secure Twig integration for CodeIgniter

173101.3k](/packages/kenjis-codeigniter-ss-twig)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

69184.6k73](/packages/codeigniter4-devkit)[michalsn/codeigniter-htmx

HTMX helper for CodeIgniter 4 framework

8339.6k](/packages/michalsn-codeigniter-htmx)[tatter/relations

Entity relationships for CodeIgniter 4

9021.6k1](/packages/tatter-relations)

PHPackages © 2026

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