Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Adgower's avatar
Level 14

Inertia.js vue3 browserSync wrong URL

When I run

npm run watch

it loads example.test:3000 When the page first loads the urls are correct, but If I select a url then go back to main page the urls lose:

:3000

port is gone and just shows the regular url

any tips on how to resolve this?

My webpack.mix.js

mix.browserSync({
    proxy: "https://" + domain,
    host: domain,
    open: "external", // 'external'
    https: {
        key: homedir + "/.config/valet/Certificates/" + domain + ".key",
        cert: homedir + "/.config/valet/Certificates/" + domain + ".crt",
    },
    notify: true,
});

Ideally the app would keep the port the whole time while run watch is running.

0 likes
0 replies

Please or to participate in this conversation.