diff --git a/assets/vite.config.ts b/assets/vite.config.ts index c677a7ff..9342c889 100644 --- a/assets/vite.config.ts +++ b/assets/vite.config.ts @@ -28,6 +28,10 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => { return { publicDir: 'static', plugins: [], + server: { + host: '0.0.0.0', + port: 5173, + }, resolve: { alias: { common: path.resolve(__dirname, 'css/common/'), diff --git a/lib/philomena_web/templates/layout/app.html.slime b/lib/philomena_web/templates/layout/app.html.slime index 996a3727..105b9b76 100644 --- a/lib/philomena_web/templates/layout/app.html.slime +++ b/lib/philomena_web/templates/layout/app.html.slime @@ -24,8 +24,8 @@ html lang="en" = csrf_meta_tag() = vite_hmr? do - script type="module" src="http://localhost:5173/@vite/client" - script type="module" src="http://localhost:5173/js/app.ts" + script type="module" src="http://#{@conn.host}:5173/@vite/client" + script type="module" src="http://#{@conn.host}:5173/js/app.ts" - else script type="text/javascript" src=~p"/js/app.js" async="async" = render PhilomenaWeb.LayoutView, "_opengraph.html", assigns