Make sure plugin loading works in NPX builds
Summary: Make sure non-bundled plugins load correctly . Note that sourcemaps don't load yet Reviewed By: nikoant Differential Revision: D33278639 fbshipit-source-id: 9951286ec6df65f33149e4687261a43e6c072c31
This commit is contained in:
committed by
Facebook GitHub Bot
parent
86b6d2c99d
commit
b1d960e4c4
@@ -57,26 +57,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
// FIXME: needed to make Metro work
|
||||
window.global = window;
|
||||
let suppressErrors = false;
|
||||
|
||||
const socket = io(location.origin);
|
||||
|
||||
socket.on('refresh', () => {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
socket.on('hasErrors', (html) => {
|
||||
openError(html);
|
||||
suppressErrors = true;
|
||||
});
|
||||
|
||||
|
||||
function openError(text) {
|
||||
if (suppressErrors) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user