* fix: 🐛 commonjs/umd fonts import Importing font into index-umd.js and creating a simple font css file with font-face Closes: #724 * fix: 🐛 Enabling workbox to cache webfonts and fonts-stylesheets Closes: #724 * fix: 🐛 Adding all type of fonts from google - Roboto Closes: #724
25 lines
628 B
JavaScript
25 lines
628 B
JavaScript
/**
|
|
* Entry point index.js for UMD packaging
|
|
*/
|
|
import 'regenerator-runtime/runtime';
|
|
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import App from './App.js';
|
|
|
|
import './fonts/fonts.css';
|
|
|
|
function installViewer(props, containerId = 'root', callback) {
|
|
const container = document.getElementById(containerId);
|
|
|
|
if (!container) {
|
|
throw new Error(
|
|
"No root element found to install viewer. Please add a <div> with the id 'root', or pass a DOM element into the installViewer function."
|
|
);
|
|
}
|
|
|
|
return ReactDOM.render(<App {...props} />, container, callback);
|
|
}
|
|
|
|
export { App, installViewer };
|