Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

connecteev's avatar

How can I customize the views (in vue.js) of a locally installed package when using vite for building assets??

I have a default laravel 10.x repository running inertia.js and vue 3.0, running vite for building frontend assets, with a package (think spatie/laravel-mailcoach, laravel/spark-stripe, etc) that I have built and installed locally in a folder at the root of my laravel project (think myLaravelProject/my_packages/packageName).

I am trying to customize the pages (vue files) generated by the package, but any changes I make to the vue files in resources/js/pages/*.vue do not get compiled into public/js/app.js, which is not changing, even when I run npm run dev or npm run build.

As a result, any changes I make to files in the package files directly: myLaravelProject/my_packages/packageName/resources/js/Pages/*.vue do not get reflected on the webpage, even if I run npm run dev or npm run build

Also, even if I copy those files over from the package to: myLaravelProject/resources/js/Pages/*.vue and make changes to them, they do not get reflected on the webpage.

How do I compile the assets in resources/js/pages/*.vue and make sure that the public/js/app.js gets updated? Note that I am using the default package.json and vite.config.js that comes with the Laravel 10 + Laravel Breeze + Inertiajs + Vue 3 starter pack.

0 likes
0 replies

Please or to participate in this conversation.