CodeIgniter 3 + Vue.js 3 + Vite
vue2
Looking for Vue 2? Please check branchJust a basic example how to integrating CodeIgniter 3 + Vue.js 3 + Vite with supported Hot Module Replacement (HMR).
If you loves CodeIgniter 3 & Vue.js, you must try this one to make your life easier!
Some changes to make this works!
- application/helpers/vite_helper.php
- application/controllers/Vue.php
- application/config/routes.php
- application/views/index.vue.php
- frontend/vite.config.js
Running the project
- Setting CodeIgniter base_url at application/config/config.php
- Open Terminal/CMD and enter to
frontend
directory - Install vue project dependencies:
npm install
- Run for development:
npm run dev
- Run for production:
npm run build
- Open the browser and go to the project address, e.g.
http://localhost/codeigniter-vue-boilerplate/
- Enjoy!
Features / ideas
I try to keep this project as simple as possible, so you can making a changes to suit your needs. No need to install a bunch of libraries for making something simple.
✅
Restful API support: response helper, ajax request validation - application/config/routes.php
- application/core/MY_Controller.php
- application/controllers/api/*
- Changes: b5f80ab & 88fbda2
✅
Middlewares - application/core/MY_Controller.php
- application/middlewares/*
- application/helpers/auth_helper.php
- application/config/config.php
- application/config/routes.php
- application/config/autoload.php
- application/controllers/api/v1/Auth.php
- application/controllers/api/v1/User.php
- Changes: 03c8145
Powered by ngekoding.github.io