Skip to content

Commit

Permalink
Use appName directly from .env
Browse files Browse the repository at this point in the history
  • Loading branch information
domnantas committed Jun 19, 2023
1 parent c65656c commit 01d9249
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stubs/inertia/resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';

const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

createInertiaApp({
title: (title) => `${title} - ${appName}`,
Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia/resources/js/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import createServer from '@inertiajs/vue3/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';

const appName = 'Laravel';
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';

createServer((page) =>
createInertiaApp({
Expand Down

0 comments on commit 01d9249

Please sign in to comment.