Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Vite Not Reflecting File Changes Without Cache Clear in Bagisto – How to Fix in Dev?

    General Discussion
    2
    2
    25
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      arunchahar last edited by

      Hi Team,

      I'm working on a custom Bagisto theme using Vite for asset bundling. The setup works fine, but I'm facing an issue during development:

      Every time I make a change to my CSS/JS or Blade files, I have to manually clear the cache to see the updates.

      Here’s a summary of my setup:

      Using laravel-vite-plugin in Bagisto (inside a custom theme)
      .env is set to:

      APP_ENV=local
      APP_DEBUG=true
      
      

      I’m running npm run dev during development

      Can anyone guide me how to fix this properly for development so changes reflect instantly without clearing cache every time?
      Any tips or best practices would be greatly appreciated.

      Thanks in advance! 🙏

      1 Reply Last reply Reply Quote 0
      • Rishabh-Webkul
        Rishabh-Webkul last edited by

        Hello @arunchahar

        Whenever any changes are made, it's important to recompile the assets.
        To do this, you need to run either npm run build or npm run dev.

        Warm Regards
        Team Bagisto

        1 Reply Last reply Reply Quote 0
        • First post
          Last post