mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 01:37:26 +00:00
Startup optimizations (#226)
* Startup optimisations * I hate this file * Inline main script * Reverting change to do a fairer perf comparison * Inlining again. Weeeeee! * Lockfile
This commit is contained in:
committed by
Jake Archibald
parent
3c757bb2b2
commit
7616d33883
@@ -4,10 +4,11 @@ import './style';
|
||||
import App from './components/App';
|
||||
|
||||
// Find the outermost Element in our server-rendered HTML structure.
|
||||
let root = document.querySelector('#app') || undefined;
|
||||
let root = document.getElementById('app_root') as Element;
|
||||
|
||||
// "attach" the client-side rendering to it, updating the DOM in-place instead of replacing:
|
||||
root = render(<App />, document.body, root);
|
||||
root.setAttribute('id', 'app_root');
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// Enable support for React DevTools and some helpful console warnings:
|
||||
|
||||
Reference in New Issue
Block a user