File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 55VITE_ORIGIN='http://localhost:3479'
66VITE_PORT=3479
77VITE_BUILD_DIR='build'
8- VITE_BUILD_DIR= 'build'
98VITE_ENTRY_FILE='main.js'
109VITE_RESOURCES_DIR='resources'
1110VITE_FRAMEWORK='none'
11+ # Set this to false, or otherwise the plugin will try to add a div with an app id in your view file
12+ VITE_ADD_APP_ID='true'
1213VITE_BACKUP_FILE=
Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ public static function decorate(string $html): string
1717 # Insert tags just before "</head>" tag.
1818 $ html = empty ($ tags ) ? $ html : str_replace ('</head> ' , "\n\t$ tags \n</head> " , $ html );
1919
20- # Insert app id just after body tag
21- $ html = empty ($ tags ) ? $ html : str_replace ('<body> ' , "<body> \n\t<div id= \"app \"> " , $ html );
22- # Close it.
23- $ html = empty ($ tags ) ? $ html : str_replace ('</body> ' , "\n\t</div> \n</body> " , $ html );
20+ if (env ('VITE_ADD_APP_ID ' ) == "true " )
21+ {
22+ # Insert app id just after body tag
23+ $ html = empty ($ tags ) ? $ html : str_replace ('<body> ' , "<body> \n\t<div id= \"app \"> " , $ html );
24+ # Close it.
25+ $ html = empty ($ tags ) ? $ html : str_replace ('</body> ' , "\n\t</div> \n</body> " , $ html );
26+ }
2427 }
2528
2629 # If not, then just return the html as it is.
You can’t perform that action at this time.
0 commit comments