mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 22:26:10 +08:00
DEV: Simplify livereload configuration for better proxy compatibility (#29742)
When running a development environment behind a proxy (e.g. when using a cloud development environment, or a service like ngrok), the ember-cli port & protocol may not match the one in the browser. `livereload.js` knows how to auto-configure itself based on the current browser environment... but Ember CLI overrides that autoconfiguration with some hard-coded values. The intention there is to allow running the livereload server on a different port to the ember-cli web proxy. We don't need that functionality. This commit stops loading `ember-cli-live-reload.js`, and instead loads `_lr/livereload.js` directly.
This commit is contained in:
parent
6779b46f55
commit
8d53f8ef1a
@ -95,8 +95,10 @@ function updateScriptReferences({
|
||||
);
|
||||
}
|
||||
|
||||
// We use _lr/livereload.js directly instead of ember-cli-live-reload so that the protocol/port is configured automatically
|
||||
// (important for cloud development environments like GitHub CodeSpaces)
|
||||
newElements.unshift(
|
||||
`<script async src="${baseURL}ember-cli-live-reload.js" nonce="${nonce}"></script>`
|
||||
`<script async src="/_lr/livereload.js?path=_lr/livereload" nonce="${nonce}"></script>`
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user