Closed clebersa closed 7 years ago
Umm I work everyday with vue.js wihut problems I will check that as soon as possible...
Hello @acacha,
I figured the problem out. It was just a caching matter. My browser cached the app.js generated and it was not seeing the new changes to the file after the execution of npm. After cleaning the cache, it worked fine.
Thanks for your help. Bye.
ok!
After updating a vue file or adding a new one and registering them in the
resources/assets/js/app.css
, the vue components do not load/update in the application, even afternpm run dev
.Detailed description
I created a fresh installation and tried to play around with Vue.js. Right after creating the project, if I insert the
<example></example>
tags in some page, the vue component is loaded and works fine. It is like the vue component is loaded somewhere right after the installation. Then, I edited the file atresources/assets/js/components/Example.vue
and rannpm install
andnpm run dev
. However, the changes I made did not have effect in the vue component. I also tried to register the Example.vue as a component with a different name in theresources/assets/js/app.css
. However, when I tried to use it in some page, the browser thrown an error in the console saying the component was not registered.I checked the timestamp of the
public/js/app.js
and it did not change with thenpm run dev
. So, I believe the problem is this. Thepublic/js/app.js
is not getting the changes fromresources/assets/js/app.js
. I believe that is a bug because it should get those changed every time I runnpm run dev
,npm run watch
ornpm run watch-poll
. I noticed that no matter what command I run, thepublic/js/app.js
will always be the same, which is the same asvendor/acacha/admin-lte-template-laravel/public/js/app.js
, by the way.it is important to mention that I created a Laravel project and played around with the Example.vue available in the project. It worked fine. After I installed the Acacha AdminLTE Laravel I could not get it working anymore.
Context
Solving this is important to enable users to use Vue.js in applications developed using Acacha AdminLTE Laravel, making them dynamic. Vue.js is a popular tool for helping developing JavaScript applications.
Possible implementation
According to what I investigated, it is related to the scripts performed when the
npm run dev
command or similar is performed. However, I could not find what exactly needs to be changed to solve the problem.Your environment
I am using a Linux VM (Ubuntu 14.04.5) with Vagrant (v1.9.1). The VM has:
Thank you for your time. I look forward for your feedback.