ampache_react/index.development.js

34 lines
900 B
JavaScript
Raw Normal View History

2016-07-26 13:21:37 +02:00
import React from "react";
import ReactDOM from "react-dom";
var a11y = require("react-a11y");
a11y(React, { ReactDOM: ReactDOM, includeSrcNode: true });
const index = require("./index.all.js");
var render = index.onWindowIntl();
if (process.env.NODE_ENV !== "production" && module.hot) {
// Support hot reloading of components
// and display an overlay for runtime errors
const renderApp = render;
const renderError = (error) => {
2016-07-30 22:54:19 +02:00
const RedBox = require("redbox-react").default;
ReactDOM.render(
<RedBox error={error} />,
index.rootElement
);
};
render = () => {
try {
renderApp();
} catch (error) {
console.error(error);
renderError(error);
}
};
module.hot.accept("./app/containers/Root", () => {
setTimeout(render);
});
}
index.Intl(render);