Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nathggns/parcel-plugin-react-static
Parcel plugin to generate static builds of React applications
https://github.com/nathggns/parcel-plugin-react-static
parcel parcel-plugin react static-site static-site-generator styled-components
Last synced: 6 days ago
JSON representation
Parcel plugin to generate static builds of React applications
- Host: GitHub
- URL: https://github.com/nathggns/parcel-plugin-react-static
- Owner: nathggns
- Created: 2018-06-17T12:51:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-27T17:12:39.000Z (almost 6 years ago)
- Last Synced: 2025-01-27T12:03:14.097Z (13 days ago)
- Topics: parcel, parcel-plugin, react, static-site, static-site-generator, styled-components
- Language: JavaScript
- Size: 161 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# parcel-plugin-react ALPHA
This is a [Parcel](https://github.com/parcel-bundler/parcel) plugin to compile a React/styled-components single page app into a static bundle.
This allows you to do what is commonly known as "server-side rendering", without the server component.
**Note:** This has currently only been developed for personal use. It is untested, and extremely rigid in how it has been written. It makes a lot of assumptions that may not apply to your use case. It is also extremely unperformant. Please consider this when deciding whether to use it.
On the other hand, if you have a need for a plugin like this, please do consider contributing.
## Caveats
* Does not support any kind of routing yet.
* Requires there to be only one HTML page in your bundle
* Requires there to be an `App.js` file that exports your main component
* Requires there to be a `#app` element in your HTML entry file.
* *Currently requires bundling everything twice – one to create your bundle, another to render your app to your bundle entry file.*## Installation
```
$ npm add parcel-plugin-react-static
// or
$ yarn add parcel-plugin-react-static
```