mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-08 07:07:15 +02:00
Try react-snap
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { hydrate, render } from 'react-dom';
|
||||
|
||||
import App from './App';
|
||||
|
||||
render(<App />, document.getElementById('root'));
|
||||
const rootElement = document.getElementById('root');
|
||||
rootElement.hasChildNodes()
|
||||
? hydrate(<App />, rootElement)
|
||||
: render(<App />, rootElement);
|
||||
|
977
package-lock.json
generated
977
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -1,15 +1,24 @@
|
||||
{
|
||||
"name": "csslayout",
|
||||
"scripts": {
|
||||
"dev": "parcel client/index.html --out-dir dist/client",
|
||||
"build": "parcel build client/index.html --out-dir dist/client"
|
||||
"dev": "parcel client/index.html --out-dir dist",
|
||||
"build": "parcel build client/index.html --out-dir dist",
|
||||
"postbuild": "react-snap"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"react-router-dom": "^5.1.2"
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-snap": "^1.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"parcel-bundler": "^1.12.4"
|
||||
},
|
||||
"reactSnap": {
|
||||
"source": "dist",
|
||||
"minifyHtml": {
|
||||
"collapseWhitespace": false,
|
||||
"removeComments": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user