Small stuff
This commit is contained in:
@@ -4,6 +4,11 @@ const path = require('path')
|
||||
const resolve = path.resolve;
|
||||
const PrerenderSPAPlugin = require('prerender-spa-plugin');
|
||||
|
||||
/* NOTE: This is a list of all routes that are prerendered for production use.
|
||||
Please list all routes that contain search engine accessible content, i.e.,
|
||||
stuff that you would like to find with a Google Search. */
|
||||
const PRERENDERED_ROUTES = ["/", "/404"];
|
||||
|
||||
const commonConfig = require('./common');
|
||||
|
||||
module.exports = merge(commonConfig, {
|
||||
@@ -20,7 +25,7 @@ module.exports = merge(commonConfig, {
|
||||
// Required - The path to the webpack-outputted app to prerender.
|
||||
staticDir: resolve(__dirname, '../../dist'),
|
||||
// Required - Routes to render.
|
||||
routes: ['/'],
|
||||
routes: PRERENDERED_ROUTES,
|
||||
})
|
||||
],
|
||||
});
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
"lint:sass": "stylelint ./src/**/**/*.scss ./src/**/*.scss ./src/*.scss",
|
||||
"start": "npm run start-dev",
|
||||
"start-dev": "webpack-dev-server --config=configs/webpack/dev.js",
|
||||
"serve": "serve -s -p 3000 dist",
|
||||
"serve": "serve -p 3000 dist",
|
||||
"start-prod": "npm run build && npm run serve",
|
||||
"mock-backend": "json-server --watch db.json -p 1234",
|
||||
"test": "npm-run-all lint test:e2e",
|
||||
|
||||
+3
-1
@@ -3,9 +3,11 @@ import { Switch, Route } from "react-router-dom";
|
||||
import App from "./components/App";
|
||||
import NotFoundPage from "./components/NotFoundPage";
|
||||
|
||||
export default () => (
|
||||
const Routes = () => (
|
||||
<Switch>
|
||||
<Route exact path="/" component={App} />
|
||||
<Route component={NotFoundPage} />
|
||||
</Switch>
|
||||
);
|
||||
|
||||
export default Routes;
|
||||
|
||||
Reference in New Issue
Block a user