File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ public function copyToBuildDirectory(): bool
8888 }
8989
9090 $ this ->keepRequiredDirectories ();
91+ $ this ->keepLivewireDispatcher ();
9192
9293 return true ;
9394 }
@@ -106,4 +107,17 @@ private function keepRequiredDirectories()
106107 $ filesystem ->dumpFile ("{$ buildPath }/storage/app/public/_native.json " , '{} ' );
107108 $ filesystem ->dumpFile ("{$ buildPath }/storage/logs/_native.json " , '{} ' );
108109 }
110+
111+ private function keepLivewireDispatcher ()
112+ {
113+ // This is a bit leaky, since we only need this for electron, not potential other drivers
114+ // We'll find a better place for it when we add more drivers.
115+ $ dispatcherPath = 'vendor/nativephp/desktop/resources/electron/electron-plugin/src/preload/livewire-dispatcher.js ' ;
116+ $ filesystem = new Filesystem ;
117+
118+ $ filesystem ->copy (
119+ $ this ->sourcePath ($ dispatcherPath ),
120+ $ this ->buildPath ("app/ {$ dispatcherPath }" )
121+ );
122+ }
109123}
You can’t perform that action at this time.
0 commit comments