oroinc / platform

Main OroPlatform package with core functionality.
Other
627 stars 351 forks source link

HMR not working properly, webpack header not identified correctly #1058

Open masmrlar opened 3 years ago

masmrlar commented 3 years ago

The HMR feature is not working properly as the check if the webpack server is running does not identify the server correctly.

Issue is https://github.com/oroinc/platform/blob/af0ff24f84dcf052e83b29e314adedb54c76b362/src/Oro/Bundle/AssetBundle/Webpack/WebpackServer.php#L55

where array_search is used to check if Express is set on the header value - which returns 0 and results to false in this implementation of the check.

anyt commented 3 years ago

Hi Thomas, It's a known issue, and there are many others with HMR since JS build was moved to webpack. For now, we can recommend using the watch option. I know it's not the same, but this is the closest experience we can offer. Thank you for the report.