Can i eject react-dev-utils files?
See original GitHub issueCan someone tell me if is there any way to override webpackHotDevClient.js file (which is in the react-dev-utils package) and the webpack.config.js (which is in the react-scripts package) ?
In the webpackHotDevClient i want to change :
// Connect to WebpackDevServer via a socket.
var connection = new WebSocket(
url.format({
protocol: 'ws',
hostname: window.location.hostname,
port: window.location.port,
// Hardcoded in WebpackDevServer
pathname: '/sockjs-node',
})
);
to
// Connect to WebpackDevServer via a socket.
var connection = new WebSocket(
url.format({
protocol: 'wss',
hostname: window.location.hostname,
port: window.location.port,
// Hardcoded in WebpackDevServer
pathname: '/sockjs-node',
})
);
And in webpack.config.js change the publicPath property to publicPath: “/Apps/MyApp/app/”. Because my app is in mydomain.com/Apps/MyApp/app/
So i can use hot dev server reloading through https.
edit : i have tryed eject command and i have the webpack.config.js in a config folder but not the webpackHotDevClient.js file. So is it possible to have an equivalent or a work around so i can edit the webpackHotDevClient.js settings as said above. Right now i’m directly editing the file in the node_modules folder.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Can i eject react-dev-utils files? - Stack Overflow
edit : i have tryed eject command and i have the webpack.config.js in a config folder but not the webpackHotDevClient.js file. So is...
Read more >react-dev-utils - npm
Start using react-dev-utils in your project by running `npm i react-dev-utils`. ... If you don't use Create React App, or if you ejected, ......
Read more >Everything you need to know about react-scripts
Running the eject script will remove the single build dependency from your project. That means it will copy the configuration files and the ......
Read more >react-dev-utils | Yarn - Package Manager
react-dev-utils ... This package includes some utilities used by Create React App. ... Inside any created project that has not been ejected, run:...
Read more >How to use the react-dev-utils/crossSpawn.sync function in ...
cmd file // to be deleted while it is running. This trips Windows up after the eject completes. // We'll read the batch...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shiglet , as a temporary fix you can do this to manually eject it:
Copy
node_modules/react-dev-utils/webpackHotDevClient.js
to your app’s root project (something like:config/webpackHotDevClient.js
).webpack.config.js
andwepackDevServer.config.js
.Edit these lines in
config/webpackHotDevClient.js
:config/webpack.configs.js
That should give you the control you need. Once that new version of
react-dev-utils
is published, you can undo those changes to sync back up.@djhouseknecht RE:
That PR should land in 3.3.1 which we’re planning to release soon. The holidays have slowed things down a bit, sorry for any trouble!