Skip to content

Commit d4fc875

Browse files
authored
Merge pull request #22 from hailwood/main
Use Vite's envDir option if specified
2 parents 07d7b9b + 0de2b05 commit d4fc875

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
124124
viteDevServerUrl = `${protocol}://${host}:${address.port}`
125125
fs.writeFileSync(hotFile, viteDevServerUrl)
126126

127-
const appUrl = loadEnv('', process.cwd(), 'APP_URL').APP_URL
127+
const envDir = resolvedConfig.envDir || process.cwd()
128+
const appUrl = loadEnv('', envDir, 'APP_URL').APP_URL
128129

129130
setTimeout(() => {
130131
server.config.logger.info(colors.red(`\n Laravel ${laravelVersion()} `))

0 commit comments

Comments
 (0)