react-on-rails
Advanced tools
Comparing version
@@ -11,2 +11,5 @@ # Change Log | ||
- Fix regression where `react_component(... prerender: true)` wouldn't find the generated asset bundle, because it wasn't looking for the hashed path. | ||
## 9.0 from 8.x. Upgrade Instructions | ||
@@ -36,3 +39,3 @@ All 9.0.0 beta versions can be viewed in [PR 908](https://github.com/shakacode/react_on_rails/pull/908) | ||
# Can be enabled by export WEBPACKER_HMR=TRUE in env | ||
hot: false | ||
hmr: false | ||
``` | ||
@@ -48,3 +51,3 @@ - See the example `spec/dummy/config/webpacker.yml`. | ||
- For hot loading, either: | ||
- Set the hot key in your `webpacker.yml` to `true`. | ||
- Set the `hmr` key in your `webpacker.yml` to `true`. | ||
- Edit your hot procfile to set env value WEBPACKER_HMR=TRUE | ||
@@ -51,0 +54,0 @@ |
{ | ||
"name": "react-on-rails", | ||
"version": "9.0.0-beta.5", | ||
"version": "9.0.0-beta.6", | ||
"description": "react-on-rails JavaScript for react_on_rails Ruby gem", | ||
@@ -5,0 +5,0 @@ "main": "node_package/lib/ReactOnRails.js", |
@@ -146,3 +146,3 @@ [](https://travis-ci.org/shakacode/react_on_rails) [](https://app.codeship.com/projects/187011) [](https://gemnasium.com/shakacode/react_on_rails) [](https://badge.fury.io/rb/react_on_rails) [](https://badge.fury.io/js/react-on-rails) [](https://codeclimate.com/github/shakacode/react_on_rails) [](https://coveralls.io/github/shakacode/react_on_rails?branch=master) | ||
```ruby | ||
gem "react_on_rails", "8.0.0" | ||
gem "react_on_rails", "9.0.0" | ||
``` | ||
@@ -240,2 +240,7 @@ | ||
## Webpacker Configuration | ||
React on Rails users should set configuration value `compile` to false, as React on Railsh andles compilation for test and production environments. | ||
## How it Works | ||
@@ -242,0 +247,0 @@ The generator installs your webpack files in the `client` folder. Foreman uses webpack to compile your code and output the bundled results to `app/assets/webpack`, which are then loaded by sprockets. These generated bundle files have been added to your `.gitignore` for your convenience. |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* NOTE: for hot reloading, env.WEBPACKER_HMR value will override any config value. This env value | ||
* NOTE: for HMR reloading, env.WEBPACKER_HMR value will override any config value. This env value | ||
* should be set to TRUE to turn this on. | ||
@@ -18,3 +18,3 @@ */ | ||
const DEFAULT_DEV_SERVER_HTTPS = false; | ||
const DEFAULT_DEV_SERVER_HOT = false; | ||
const DEFAULT_DEV_SERVER_HMR = false; | ||
@@ -25,3 +25,3 @@ /** | ||
* devBuild, | ||
* hotReloadingEnabled, | ||
* hmrReloadingEnabled, | ||
* devServerEnabled, | ||
@@ -48,3 +48,3 @@ * devServerHost, | ||
const devServerHttps = devServerValues && (devServerValues.https || DEFAULT_DEV_SERVER_HTTPS); | ||
const devServerHot = devServerValues && (devServerValues.hot || DEFAULT_DEV_SERVER_HOT); | ||
const devServerHmr = devServerValues && (devServerValues.hmr || DEFAULT_DEV_SERVER_HMR); | ||
@@ -59,3 +59,3 @@ // NOTE: Rails path is hard coded to `/public` | ||
const devServerEnabled = !!devServerValues; | ||
const hotReloadingEnabled = !!devServerHot || env.WEBPACKER_HMR === 'TRUE'; | ||
const hmrReloadingEnabled = !!devServerHmr || env.WEBPACKER_HMR === 'TRUE'; | ||
@@ -69,3 +69,3 @@ let devServerUrl = null; | ||
devBuild, | ||
hotReloadingEnabled, | ||
hmrReloadingEnabled, | ||
devServerEnabled, | ||
@@ -72,0 +72,0 @@ devServerHost, |
142341
0.23%716
0.7%