Download the PHP package yassinedoghri/codeigniter-vite without Composer

On this page you can find all versions of the php package yassinedoghri/codeigniter-vite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package codeigniter-vite

# CodeIgniter Vite 🔥⚡ [![Latest Stable Version](https://poser.pugx.org/yassinedoghri/codeigniter-vite/v)](https://packagist.org/packages/yassinedoghri/codeigniter-vite) [![Total Downloads](https://poser.pugx.org/yassinedoghri/codeigniter-vite/downloads)](https://packagist.org/packages/yassinedoghri/codeigniter-vite) [![License](https://img.shields.io/github/license/yassinedoghri/codeigniter-vite?color=green)](https://packagist.org/packages/yassinedoghri/codeigniter-vite) [![PHP Version Require](https://poser.pugx.org/yassinedoghri/codeigniter-vite/require/php)](https://packagist.org/packages/yassinedoghri/codeigniter-vite) An opinionated [Vite](https://vite.dev/) integration for [CodeIgniter4](https://codeigniter.com/) projects,\ just so that you don't have to think about it!

Easily organize and bundle JavaScript, TypeScript, and CSS files within a resources folder at the root of your CodeIgniter4 project:


🚀 Getting started

0. Prerequisites

  1. Install Node.js* with one of the following package managers:

    • npm (should be included with Node install)
    • pnpm (recommended),
    • yarn

    *You may want to use Deno or Bun instead.

  2. Create a package.json file:

1. Installation

  1. Install codeigniter-vite using composer:

  2. Install Vite with vite-plugin-codeigniter:

2. Initial setup

Run the following command. This command handles steps 1-4 of Manual Setup for you.

Manual Setup

[!NOTE]
You may skip this if you've used the setup command above.

  1. Copy the Vite.php file from vendor/yassinedoghri/codeigniter-vite/src/Config into your project's config folder, update the namespace to Config and have the class extend the original class like so:

  2. Create your vite.config.js file in your project's root and add the vite-plugin-codeigniter plugin:

  3. Add Vite's scripts to your package.json:

  4. Create the resources folder in the root of your project:

3. Working with Vite's dev server

  1. Set Vite environment to development in your .env:

  2. Run Vite's dev server with:

    By default, the server will launch @http://localhost:5173.

  3. Work your magic! 🪄

[!IMPORTANT]
Add your JS/TS, and CSS files in the resources directory and inject them into your pages by using the routes/assets mapping in your app/Config/Vite.php file.

📦 Bundle for production

For production, run the build command:

This will create an assets folder in your public directory including all of your bundled css and js files + a manifest.json file under a .vite/ directory.

⚙️ Config reference

Routes/Assets mapping

For assets to be injected in your routes <head>, you must define the $routesAssets property in your app/Config/Vite.php file.

The $routesAssets property takes in an array of routes/assets mappings:

[!NOTE]
You can use the * wildcard to match any other applicable characters in the routes.

Vite Environment

Vite environment is set to production by default, meaning it's looking for assets in the public/assets folder.\ By setting it to development in your .env, it will instead point to Vite's dev server.

Other properties

You can tweak CodeIgniterVite's config if needed:

[!IMPORTANT]
These defaults are in sync with vite-plugin-codeigniter's defaults. If you edit these, make sure you set the same values for vite-plugin-codeigniter's options in your vite.config.js file.

❤️ Acknowledgments

This wouldn't have been possible without the amazing work of the CodeIgniter team.

Inspired by codeigniter-vitejs & codeigniter4/shield.

📜 License

Code released under the MIT License.

Copyright (c) 2025-present, Yassine Doghri (@yassinedoghri).


All versions of codeigniter-vite with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yassinedoghri/codeigniter-vite contains the following files

Loading the files please wait ....