SPL3S's avatar
Level 1

npm run dev or build or watch does not pickup changes in resources/js

I upgraded Laravel with the help of Shift from 5.7 to 10. Started to do some changes in old vue components but cant make them to be compiled in my app.js. Cleared cache of laravel config, used several different browsers still nothing changes.

After running npm run watch I see that changes being picked up in routes file, but not in resources folder. Not sure where to look for the issue... Here's my vite.config.js

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue2';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/sass/app.scss',
                'resources/js/app.js',
            ],
            refresh: true,
        }),
        vue({
            template: {
                transformAssetUrls: {
                    base: null,
                    includeAbsolute: false,
                },
            },
        }),
    ],
});
0 likes
1 reply
gych's avatar

With Vite you have to use npm run dev Try to edit app.js file and see if that change gets picked up.

Please or to participate in this conversation.