File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111const { launchEditor } = require ( 'react-dev-utils/launchEditor' ) ;
1212
1313module . exports = function createLaunchEditorMiddleware ( ) {
14+ if ( process . platform === 'win32' ) {
15+ const { launchPowerShellAgent } = require ( 'react-dev-utils/launchEditor' ) ;
16+ launchPowerShellAgent ( ) ;
17+ }
18+
1419 return function launchEditorMiddleware ( req , res , next ) {
1520 // Keep this in sync with react-error-overlay
1621 if ( req . url . startsWith ( '/__open-stack-frame-in-editor' ) ) {
Original file line number Diff line number Diff line change @@ -85,12 +85,6 @@ choosePort(HOST, DEFAULT_PORT)
8585 }
8686 console . log ( chalk . cyan ( 'Starting the development server...\n' ) ) ;
8787 openBrowser ( urls . localUrlForBrowser ) ;
88- if ( process . platform === 'win32' ) {
89- const {
90- launchPowerShellAgent,
91- } = require ( 'react-dev-utils/launchEditor' ) ;
92- launchPowerShellAgent ( ) ;
93- }
9488 } ) ;
9589
9690 [ 'SIGINT' , 'SIGTERM' ] . forEach ( function ( sig ) {
You can’t perform that action at this time.
0 commit comments