We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9d7685 commit 1dcabfaCopy full SHA for 1dcabfa
1 file changed
src/Commands/Init.php
@@ -136,17 +136,18 @@ private function updateEnvFile()
136
{
137
# Get .env content.
138
$envContent = file_get_contents($envFile);
139
-
140
# Set framework.
141
$updates = str_replace("VITE_FRAMEWORK='none'", "VITE_FRAMEWORK='$this->framework'", $envContent);
142
+ file_put_contents($envFile, $updates);
143
+
144
# React entry file (main.jsx).
- if ($this->framework !== 'react')
145
+ if ($this->framework === 'react')
146
147
+ $envContent = file_get_contents($envFile);
148
$updates = str_replace("VITE_ENTRY_FILE='main.js'", "VITE_ENTRY_FILE='main.jsx'", $envContent);
149
150
}
- file_put_contents($envFile, $updates);
151
152
153
# env updated.
0 commit comments