Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

Astrocoders/lambdasorocaba-5-onegraph

Repository files navigation

Run Project

npm installnpm start# in another tabnpm run webpack

After you see the webpack compilation succeed (thenpm run webpack step), open upbuild/index.html (no server needed!). Then modify whichever.re file insrc and refresh the page to see the changes.

For more elaborate ReasonReact examples, please seehttps://github.com/reasonml-community/reason-react-example

Run Project with Server

To run with the webpack development server runnpm run server and view in the browser athttp://localhost:8000. Running in this environment provides hot reloading and support for routing; just edit and save the file and the browser will automatically refresh.

Note that any hot reload on a route will fall back to the root (/), soReasonReact.Router.dangerouslyGetInitialUrl will likely be needed alongside theReasonReact.Router.watchUrl logic to handle routing correctly on hot reload refreshes or simply opening the app at a URL that is not the root.

To use a port other than 8000 set thePORT environment variable (PORT=8080 npm run server).

Build for Production

npm run cleannpm run buildnpm run webpack:production

This will replace the development artifactbuild/Index.js for an optimized version as well as copysrc/index.html intobuild/. You can then deploy the contents of thebuild directory (index.html andIndex.js).

If you make use of routing (viaReasonReact.Router or similar logic) ensure that server-side routing handles your routes or that 404's are directed back toindex.html (which is how the dev server is set up).

To enable dead code elimination, changebsconfig.json'spackage-specsmodule from"commonjs" to"es6". Then re-run the above 2 commands. This will allow Webpack to remove unused code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp