* ci: test docs-publish * Specify to use prod * Babel should transpile with env set by webpack * in-progress * in-progress * Polyfill for ie11 and edge features * Ditch polyfills w/ babel - we'll use a service for now * Bump tools version; shift vtk.js up a layer * Specify we shouldn't target older than IE 11 * ditch babel plugins that should be covered by preset-env * Add a top level build demo command * Let our babel config determine settings * Same babel fixes as PWA * Rebuild deps that don't satisfy our target * Mini helper script for excluding all node_modules, except... * Shift vtk.js dep up a layer * Kill core-js * Export in a node happy way * Updated yarn lock * Set NODE_ENV when launching anything w/ WebPack * docs: updated FAQ * docs: on browser support * Add support for redux browser extension * misc. small clean-up * docs: Remove roadmap page; add browser-support to sidebar * Formatting * Remove roadmap links * Formatting * ci: Remove config syntax error * Simplified bug report template * update community request template * Update question's template * simplify build scripts * specify new script names * fix: for measurement api being pruned by minimizer in prod builds * Use named exports * Simplify config * Let's not do so much heavy lifting for a dev-server build * fix dev build * Add hotkeys to demo * fix: jest babel config and env specific configs * Remove call to non-existant command * Shift experimental proposal plugin up a layer * Use `https` * Try with reduced number of package exceptions * Try to resolve cypress issue * Try to fix cypress issue in CI * Skip https
54 lines
1.5 KiB
JavaScript
54 lines
1.5 KiB
JavaScript
/**
|
|
* Entry point for development and production PWA builds.
|
|
* Packaged (NPM) builds go through `index-umd.js`
|
|
*/
|
|
|
|
import 'regenerator-runtime/runtime';
|
|
|
|
import App from './App.js';
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
|
|
/**
|
|
* EXTENSIONS
|
|
* =================
|
|
*
|
|
* Importing and modifying the extensions our app uses HERE allows us to leverage
|
|
* tree shaking and a few other niceties. However, by including them here they become
|
|
* "baked in" to the published application.
|
|
*
|
|
* Depending on your use case/needs, you may want to consider not adding any extensions
|
|
* by default HERE, and instead provide them via the configuration specified at
|
|
* `window.config.extensions`, or by using the exported `App` component, and passing
|
|
* in your extensions as props.
|
|
*/
|
|
import OHIFVTKExtension from '@ohif/extension-vtk';
|
|
import OHIFDicomHtmlExtension from '@ohif/extension-dicom-html';
|
|
import OHIFDicomMicroscopyExtension from '@ohif/extension-dicom-microscopy';
|
|
import OHIFDicomPDFExtension from '@ohif/extension-dicom-pdf';
|
|
|
|
// Default Settings
|
|
let config = {};
|
|
const appDefaults = {
|
|
routerBasename: '/',
|
|
relativeWebWorkerScriptsPath: '',
|
|
};
|
|
|
|
if (window) {
|
|
config = window.config || {};
|
|
config.extensions = [
|
|
OHIFVTKExtension,
|
|
OHIFDicomHtmlExtension,
|
|
OHIFDicomMicroscopyExtension,
|
|
OHIFDicomPDFExtension,
|
|
];
|
|
}
|
|
|
|
const appProps = Object.assign({}, appDefaults, config);
|
|
|
|
// Create App
|
|
const app = React.createElement(App, appProps, null);
|
|
|
|
// Render
|
|
ReactDOM.render(app, document.getElementById('root'));
|