Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.3.x] Add app/View/Components/** to default refresh paths #55

Merged
merged 3 commits into from
Jul 5, 2022

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Jul 2, 2022

This PR adds app/View/Components/** to the global default directories to watch and perform full page reloads for. This is useful as View Components may be entirely specified in the class itself with no blade file.

Additionally, it also exports the default directories so users can utilise the default list and just add their own. Here would be an example of he export usage...

import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
            ],
            refresh: [
                ...refreshPaths,
                'app/Http/Livewire/**'
            ],
        }),
    ],
});

@timacdonald timacdonald requested a review from jessarcher July 2, 2022 07:16
Copy link
Member

@jessarcher jessarcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dig the export :)

@timacdonald timacdonald merged commit cb54075 into main Jul 5, 2022
@timacdonald timacdonald deleted the vite-components branch July 5, 2022 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants