尤里电竞——希望之火 http://www.u-li.fun/

blodughofi a4aa7c1b57 first commit 3 years ago
public a4aa7c1b57 first commit 3 years ago
src a4aa7c1b57 first commit 3 years ago
.gitignore a4aa7c1b57 first commit 3 years ago
README.md a4aa7c1b57 first commit 3 years ago
config-overrides.js a4aa7c1b57 first commit 3 years ago
package-lock.json a4aa7c1b57 first commit 3 years ago
package.json a4aa7c1b57 first commit 3 years ago
yarn.lock a4aa7c1b57 first commit 3 years ago

README.md

Create-React-App - Prerender SPA Example

This project was bootstrapped with Create React App and uses react-app-rewired to allow modification of the webpack configuration.

Build

npm install
npm run build

Now check the new build directory for your prerendered static files!

To view the rendered files, install http-server (npm install -g http-server) if you haven't already and run it in the build directory.

Now visit the following route in your browser (note the trailing slash):

If all went well, it should load without JavaScript.

Development

To edit the prerender-spa-plugin configuration, look for new PrerenderSPAPlugin in config-overrides.js.

If you're using a router or have more than one page to prerender, edit the routes array under that config object.

npm install
npm start