File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -136,17 +136,18 @@ private function updateEnvFile()
136136 {
137137 # Get .env content.
138138 $ envContent = file_get_contents ($ envFile );
139-
140139 # Set framework.
141140 $ updates = str_replace ("VITE_FRAMEWORK='none' " , "VITE_FRAMEWORK=' $ this ->framework ' " , $ envContent );
142141
142+ file_put_contents ($ envFile , $ updates );
143+
143144 # React entry file (main.jsx).
144- if ($ this ->framework ! == 'react ' )
145+ if ($ this ->framework = == 'react ' )
145146 {
147+ $ envContent = file_get_contents ($ envFile );
146148 $ updates = str_replace ("VITE_ENTRY_FILE='main.js' " , "VITE_ENTRY_FILE='main.jsx' " , $ envContent );
149+ file_put_contents ($ envFile , $ updates );
147150 }
148-
149- file_put_contents ($ envFile , $ updates );
150151 }
151152
152153 # env updated.
You can’t perform that action at this time.
0 commit comments