chore: update previews

This commit is contained in:
unix
2020-05-16 01:10:30 +08:00
parent 10aca5d767
commit a3970d4e18
12 changed files with 16 additions and 122 deletions

View File

@@ -8,4 +8,17 @@ we use [react-app-rewired](https://github.com/timarney/react-app-rewired) to cha
- Add `config-overrides.js` to your root folder.
- Add deps: `yarn add babel-plugin-import customize-cra react-app-rewired -D`
- Replace your default scripts(`react-script`) with `react-app-rewired`.
- Replace your default scripts(`react-scripts`) with `react-app-rewired`.
### Previews
**Before:**
![before](public/esm-1.png)
<br />
**After:**
![after](public/esm-2.png)

View File

@@ -1,19 +0,0 @@
{
"files": {
"main.js": "/static/js/main.7a7bd826.chunk.js",
"main.js.map": "/static/js/main.7a7bd826.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.8162d212.js",
"runtime-main.js.map": "/static/js/runtime-main.8162d212.js.map",
"static/js/2.29503262.chunk.js": "/static/js/2.29503262.chunk.js",
"static/js/2.29503262.chunk.js.map": "/static/js/2.29503262.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.63b0491f3ef4af49ae10cd9bdf1e9390.js": "/precache-manifest.63b0491f3ef4af49ae10cd9bdf1e9390.js",
"service-worker.js": "/service-worker.js",
"static/js/2.29503262.chunk.js.LICENSE.txt": "/static/js/2.29503262.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.8162d212.js",
"static/js/2.29503262.chunk.js",
"static/js/main.7a7bd826.chunk.js"
]
}

View File

@@ -1 +0,0 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Tree Shaking</title></head><body><div id="app"></div><script>!function(e){function t(t){for(var n,l,f=t[0],i=t[1],a=t[2],p=0,s=[];p<f.length;p++)l=f[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,f=1;f<r.length;f++){var i=r[f];0!==o[i]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var f=this["webpackJsonpcustom-styles"]=this["webpackJsonpcustom-styles"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var a=0;a<f.length;a++)t(f[a]);var c=i;r()}([])</script><script src="/static/js/2.29503262.chunk.js"></script><script src="/static/js/main.7a7bd826.chunk.js"></script></body></html>

View File

@@ -1,22 +0,0 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "91109fc0c00eba83723209779164694e",
"url": "/index.html"
},
{
"revision": "629e0a1a6c3cb4842ad2",
"url": "/static/js/2.29503262.chunk.js"
},
{
"revision": "e88a3e95b5364d46e95b35ae8c0dc27d",
"url": "/static/js/2.29503262.chunk.js.LICENSE.txt"
},
{
"revision": "d54c0ca8346721963b86",
"url": "/static/js/main.7a7bd826.chunk.js"
},
{
"revision": "2b9d340a918a2bda0c0c",
"url": "/static/js/runtime-main.8162d212.js"
}
]);

View File

@@ -1,39 +0,0 @@
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
importScripts(
"/precache-manifest.63b0491f3ef4af49ae10cd9bdf1e9390.js"
);
self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});
workbox.core.clientsClaim();
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), {
blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/],
});

File diff suppressed because one or more lines are too long

View File

@@ -1,32 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.19.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

View File

@@ -1,2 +0,0 @@
(this["webpackJsonpcustom-styles"]=this["webpackJsonpcustom-styles"]||[]).push([[0],{19:function(e,t,n){e.exports=n(29)},29:function(e,t,n){"use strict";n.r(t);var l=n(15),a=n(18),r=n(0),u=n.n(r),c=n(10),s=n.n(c),o=n(16),m=n(17),i=function(){return u.a.createElement(o.a,null,u.a.createElement(m.a,null,"Hello world."))},p=function(){return u.a.createElement(l.a,null,u.a.createElement(a.a,null),u.a.createElement(i,null))};s.a.render(u.a.createElement(u.a.StrictMode,null,u.a.createElement(p,null)),document.getElementById("app"));t.default=p}},[[19,1,2]]]);
//# sourceMappingURL=main.7a7bd826.chunk.js.map

View File

@@ -1,2 +0,0 @@
!function(e){function t(t){for(var n,l,f=t[0],i=t[1],a=t[2],p=0,s=[];p<f.length;p++)l=f[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,f=1;f<r.length;f++){var i=r[f];0!==o[i]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var f=this["webpackJsonpcustom-styles"]=this["webpackJsonpcustom-styles"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var a=0;a<f.length;a++)t(f[a]);var c=i;r()}([]);
//# sourceMappingURL=runtime-main.8162d212.js.map

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -1,9 +1,10 @@
import React from 'react'
import { Page, Text } from '@zeit-ui/react'
import { Page, Text, Button } from '@zeit-ui/react'
const Home = () => (
<Page>
<Text>Hello world.</Text>
<Button>Action</Button>
</Page>
)