mihatorikei / codeigniter-vitejs

ViteJS Integration For Codeigniter4 🔥⚡
MIT License
93 stars 11 forks source link

SvelteKit support #17

Closed seunex17 closed 2 years ago

seunex17 commented 2 years ago

Hello, I really love the starter template, which seems to be a very good kick start to the repo.

Please, I don't know if it's possible to support SvelteKit and we use CodeIgniter as the server side.

jaguarch commented 2 years ago

Working on it, i'll let you know as soon as possible

seunex17 commented 2 years ago

Working on it, i'll let you know as soon as possible

Thanks Man 😊

mihatorikei commented 2 years ago

@jaguarch SvelteKit isn't stable yet, expect bugs

PwrSrg commented 2 years ago

I am extremely interested in this as well!

jaguarch commented 2 years ago

@seunex17 @PwrSrg

https://github.com/firtadokei/codeigniter-vitejs/tree/v2

Let me know if it works fine

seunex17 commented 2 years ago

@jaguarch Will let you know ASAP 😃

seunex17 commented 2 years ago

@jaguarch It looks great when you start the server from the base url (http://localhost:8080). After the landing page, I then navigate to the about page, which works really well now. I try to reload the page when at the about page or visit the about page url directly (http://localhost:8080/about). While loading the page, it first displays the CodeIgniter default page, followed by a blank page, as shown in the screenshot below.

image

I think more work here is in the .htaccess file we need to send every request to index.php file.

seunex17 commented 2 years ago

Going through the package src file, I notice that the Codeigniter4 Vite has a default home page route defined, which points to the Codeigniter default homepage. I delete this file and replace it with a very simple blank index page that has a div element with an id=app.

It seems to be looking good after taking the above process.

PwrSrg commented 2 years ago

NICE Catch! 👍🏼

seunex17 commented 2 years ago

This is really looking good. The load() function is fantastic! Loading data from Codeingiter is just perfect, man!

jaguarch commented 2 years ago

@seunex17 Glad to hear that, i'm always ready to help if you have any other suggestion.