Enable HMR depending on debug mode#43601
Conversation
Signed-off-by: Jonas Heinrich <heinrich@synyx.de>
|
|
||
| // Loosen security presets in debug mode to enable development | ||
| // tools functionality | ||
| $debugging = \OC::$server->getConfig()->getSystemValue('debug', false); |
There was a problem hiding this comment.
please use dependency injection in the construct :)
\OC::$server->getConfig() is deprecated
ChristophWurst
left a comment
There was a problem hiding this comment.
I am strongly against this. Most developers have their dev setups in debug mode and never test without. So we'll likely run into features breaking in production because nobody notices CSP errors locally.
would it be possible to introduce an extra system setting variable like "enable_hmr" which can be only enabled if debug mode is also enabled? |
|
HMR requires connection to only one server on a specific host. A proper solution would be to fix only required restrictions for a specific dev server and not to disable CSP completely. |
|
I'd personally prefer to have a solution in a separated app, not in the server. |
Summary
Currently Nextlouc needs to get patched to use Vue Devtools due to "hot module reloading" is restricted, see
This PR loosens security on debug mode and makes Vue Devtools usable
Checklist