Skip to content

Allow hot file host to be configured#169

Closed
nurdism wants to merge 2 commits into
laravel:mainfrom
nurdism:main
Closed

Allow hot file host to be configured#169
nurdism wants to merge 2 commits into
laravel:mainfrom
nurdism:main

Conversation

@nurdism
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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