Skip to content

Commit 95c93f8

Browse files
committed
render as you fetch
1 parent b2555bc commit 95c93f8

26 files changed

Lines changed: 303 additions & 842 deletions

package-lock.json

Lines changed: 90 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525
"homepage": "https://github.com/ryansolid/solid-realworld#readme",
2626
"dependencies": {
2727
"marked": "^0.8.0",
28-
"solid-js": "0.16.6"
28+
"solid-js": "0.16.8"
2929
},
3030
"devDependencies": {
31-
"@babel/core": "7.8.3",
31+
"@babel/core": "7.8.4",
3232
"@babel/plugin-proposal-optional-chaining": "7.8.3",
3333
"@babel/plugin-syntax-dynamic-import": "7.8.3",
34-
"babel-preset-solid": "~0.16.6",
35-
"rollup": "1.29.0",
34+
"@rollup/plugin-commonjs": "11.0.2",
35+
"@rollup/plugin-node-resolve": "7.1.1",
36+
"babel-preset-solid": "~0.16.8",
37+
"rollup": "1.31.1",
3638
"rollup-plugin-babel": "4.3.3",
3739
"rollup-plugin-clear": "^2.0.7",
38-
"rollup-plugin-commonjs": "^10.1.0",
39-
"rollup-plugin-node-resolve": "5.2.0",
4040
"rollup-plugin-terser": "^5.2.0",
4141
"serve": "^11.3.0"
4242
}

rollup.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import resolve from "rollup-plugin-node-resolve";
2-
import commonjs from "rollup-plugin-commonjs";
1+
import resolve from "@rollup/plugin-node-resolve";
2+
import commonjs from "@rollup/plugin-commonjs";
33
import babel from "rollup-plugin-babel";
44
import clear from "rollup-plugin-clear";
55
import { terser } from "rollup-plugin-terser";
@@ -16,11 +16,12 @@ const plugins = [
1616
}),
1717
resolve({ extensions: [".js", ".jsx"] }),
1818
commonjs(),
19-
process.env.production && terser()
19+
terser()
2020
];
2121

2222
export default {
2323
input: "src/index.js",
24+
manualChunks: {vendor: ["solid-js", "solid-js/dom"]},
2425
output: {
2526
dir: "dist",
2627
format: "esm"

src/App.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { lazy } from "solid-js";
22
import { useStore, useRouter } from "./store";
33
import NavBar from "./components/NavBar";
4+
import Home from "./pages/Home";
5+
import Article from "./pages/Article";
6+
import Profile from "./pages/Profile";
47

5-
const Home = lazy(() => import("./components/Home")),
6-
Editor = lazy(() => import("./components/Editor")),
7-
Settings = lazy(() => import("./components/Settings")),
8-
Auth = lazy(() => import("./components/Auth")),
9-
Article = lazy(() => import("./components/Article")),
10-
Profile = lazy(() => import("./components/Profile"));
8+
const Editor = lazy(() => import("./pages/Editor")),
9+
Settings = lazy(() => import("./pages/Settings")),
10+
Auth = lazy(() => import("./pages/Auth"));
1111

1212
export default () => {
1313
const [store, { setAppLoaded, pullUser }] = useStore(),

0 commit comments

Comments
 (0)