Skip to content

Allow hot file host to be configured #169

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

Closed
wants to merge 2 commits into from
Closed

Allow hot file host to be configured #169

wants to merge 2 commits into from

Conversation

nurdism
Copy link
Contributor

@nurdism nurdism commented Nov 19, 2022

In my dev container solution I am running the whole thing behind a reverse proxy and proxying /@vite*, /node_modules* & /resources* to the running vite instance. I've been running into is not being able to force this plugin to either not specify a host or to force it to use a host. This option is optional and allows you to specify a host rather than attempting to figure it out.

@timacdonald
Copy link
Member

Hi @nurdism,

Thanks for the PR.

You can completely control the hot file by specifying the server configuration. The following shows you how to control the protocol, host, and port that ends up in the hot file.

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

export default defineConfig({
    plugins: [
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
    ],
    server: {
        https: true,
        host: 'foo.test',
        port: '8080',
    }
});

I understand that you may have got this sorted and are looking to make it easier, however I personally would prefer to not add another way to control this - at least for now.

Thanks again.

@nurdism
Copy link
Contributor Author

nurdism commented Nov 28, 2022

@timacdonald opened issue #178 to explain further

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