react_on_rails 12.0.0.pre.beta.4 → 12.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint-js-and-ruby.yml +53 -0
- data/.github/workflows/main.yml +178 -0
- data/.github/workflows/package-js-tests.yml +35 -0
- data/.github/workflows/rspec-package-specs.yml +45 -0
- data/.rubocop.yml +1 -0
- data/.travis.yml +8 -4
- data/CHANGELOG.md +37 -20
- data/CONTRIBUTING.md +1 -1
- data/NEWS.md +5 -0
- data/README.md +65 -62
- data/SUMMARY.md +1 -1
- data/docs/additional-reading/converting-from-custom-webpack-config-to-rails-webpacker-config.md +10 -0
- data/docs/additional-reading/react-router.md +1 -1
- data/docs/additional-reading/recommended-project-structure.md +69 -0
- data/docs/additional-reading/server-rendering-tips.md +4 -1
- data/docs/api/javascript-api.md +3 -3
- data/docs/api/redux-store-api.md +2 -2
- data/docs/api/view-helpers-api.md +4 -4
- data/docs/basics/client-vs-server-rendering.md +2 -0
- data/docs/basics/configuration.md +1 -1
- data/docs/basics/hmr-and-hot-reloading-with-the-webpack-dev-server.md +64 -9
- data/docs/basics/react-server-rendering.md +8 -5
- data/docs/basics/render-functions-and-railscontext.md +1 -1
- data/docs/basics/upgrading-react-on-rails.md +47 -10
- data/docs/basics/webpack-configuration.md +12 -18
- data/docs/misc/doctrine.md +0 -1
- data/docs/outdated/code-splitting.md +3 -3
- data/docs/tutorial.md +6 -0
- data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +4 -1
- data/lib/react_on_rails/helper.rb +8 -8
- data/lib/react_on_rails/utils.rb +5 -1
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/webpacker_utils.rb +4 -4
- data/lib/tasks/assets.rake +17 -5
- data/package.json +1 -1
- data/rakelib/examples.rake +1 -1
- data/rakelib/lint.rake +1 -1
- data/rakelib/release.rake +1 -3
- metadata +10 -5
- data/docs/basics/recommended-project-structure.md +0 -77
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ca3650879f76d12748c0bb421da2d776fec62e7599e23552de09b21d19e8bff
|
4
|
+
data.tar.gz: b1e30785a72bc83dd0671ddcb26f768bacfc2cb2ccc9293e93be36286848d281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ee2dcd8f08ac5cb3a7980639673b06a38a6bd29aa9b0e3e7956a8e45a262b3ffd036fbea5d387be8f025a96cb2f8af2592bbb08b4a34edb6114df4554a7d74d
|
7
|
+
data.tar.gz: 1a21c1642097dc08f081b75e1dd9542128227a3464c76b4188e1e7e1471466a0273ef72151ca662272b08be7bec254085e7d6eb8287059baa60c6303b138f1cb
|
@@ -0,0 +1,53 @@
|
|
1
|
+
name: Lint JS and Ruby
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: [2.6]
|
10
|
+
node: [12]
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Setup Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
18
|
+
- name: Setup Node
|
19
|
+
uses: actions/setup-node@v1.4.3
|
20
|
+
with:
|
21
|
+
node-version: ${{ matrix.node }}
|
22
|
+
- name: Print system information
|
23
|
+
run: |
|
24
|
+
echo "Linux release: "; cat /etc/issue
|
25
|
+
echo "Current user: "; whoami
|
26
|
+
echo "Current directory: "; pwd
|
27
|
+
echo "Ruby version: "; ruby -v
|
28
|
+
echo "Node version: "; node -v
|
29
|
+
echo "Yarn version: "; yarn --version
|
30
|
+
echo "Bundler version: "; bundle --version
|
31
|
+
- name: Save root node_modules to cache
|
32
|
+
uses: actions/cache@v2
|
33
|
+
with:
|
34
|
+
path: node_modules
|
35
|
+
key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
36
|
+
- name: Save root ruby gems to cache
|
37
|
+
uses: actions/cache@v2
|
38
|
+
with:
|
39
|
+
path: vendor/bundle
|
40
|
+
key: v4-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
|
41
|
+
- name: Install Node modules with Yarn for renderer package
|
42
|
+
run: |
|
43
|
+
yarn install --no-progress --no-emoji
|
44
|
+
yarn run eslint -v
|
45
|
+
sudo yarn global add yalc
|
46
|
+
- name: Install Ruby Gems for package
|
47
|
+
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
48
|
+
- name: Linting of Ruby
|
49
|
+
run: bundle exec rubocop
|
50
|
+
- name: Linting of JS
|
51
|
+
run: yarn start lint
|
52
|
+
- name: Check formatting
|
53
|
+
run: yarn start format.listDifferent
|
@@ -0,0 +1,178 @@
|
|
1
|
+
name: Main test
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build-dummy-app-webpack-test-bundles:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: [2.6]
|
10
|
+
node: [12]
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Setup Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
18
|
+
- name: Setup Node
|
19
|
+
uses: actions/setup-node@v1.4.3
|
20
|
+
with:
|
21
|
+
node-version: ${{ matrix.node }}
|
22
|
+
- name: Print system information
|
23
|
+
run: |
|
24
|
+
echo "Linux release: "; cat /etc/issue
|
25
|
+
echo "Current user: "; whoami
|
26
|
+
echo "Current directory: "; pwd
|
27
|
+
echo "Ruby version: "; ruby -v
|
28
|
+
echo "Node version: "; node -v
|
29
|
+
echo "Yarn version: "; yarn --version
|
30
|
+
echo "Bundler version: "; bundle --version
|
31
|
+
- name: Save root node_modules to cache
|
32
|
+
uses: actions/cache@v2
|
33
|
+
with:
|
34
|
+
path: node_modules
|
35
|
+
key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
36
|
+
- name: Install Node modules with Yarn for renderer package
|
37
|
+
run: |
|
38
|
+
yarn install --no-progress --no-emoji
|
39
|
+
yarn run eslint -v
|
40
|
+
sudo yarn global add yalc
|
41
|
+
- name: yalc publish for react-on-rails
|
42
|
+
run: yalc publish
|
43
|
+
- name: Save spec/dummy/node_modules to cache
|
44
|
+
uses: actions/cache@v2
|
45
|
+
with:
|
46
|
+
path: spec/dummy/node_modules
|
47
|
+
key: v4-dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/yarn.lock') }}
|
48
|
+
- name: yalc add react-on-rails
|
49
|
+
run: cd spec/dummy && yalc add react-on-rails
|
50
|
+
- name: Install Node modules with Yarn for dummy app
|
51
|
+
run: cd spec/dummy && yarn install --no-progress --no-emoji
|
52
|
+
- name: Save dummy app ruby gems to cache
|
53
|
+
uses: actions/cache@v2
|
54
|
+
with:
|
55
|
+
path: spec/dummy/vendor/bundle
|
56
|
+
key: v4-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
|
57
|
+
- name: Install Ruby Gems for dummy app
|
58
|
+
run: cd spec/dummy && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
59
|
+
- name: Build test bundles for dummy app
|
60
|
+
run: cd spec/dummy && yarn run build:test
|
61
|
+
- id: get-sha
|
62
|
+
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
|
63
|
+
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
|
64
|
+
uses: actions/cache@v2
|
65
|
+
with:
|
66
|
+
path: spec/dummy/public/webpack
|
67
|
+
key: v4-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
|
68
|
+
|
69
|
+
main:
|
70
|
+
needs: build-dummy-app-webpack-test-bundles
|
71
|
+
strategy:
|
72
|
+
matrix:
|
73
|
+
ruby: [2.6]
|
74
|
+
node: [12]
|
75
|
+
rake_task: ['run_rspec:all_dummy', 'run_rspec:all_but_examples', 'run_rspec:examples']
|
76
|
+
runs-on: ubuntu-latest
|
77
|
+
steps:
|
78
|
+
- uses: actions/checkout@v2
|
79
|
+
- name: Setup Ruby
|
80
|
+
uses: ruby/setup-ruby@v1
|
81
|
+
with:
|
82
|
+
ruby-version: ${{ matrix.ruby }}
|
83
|
+
- name: Setup Node
|
84
|
+
uses: actions/setup-node@v1.4.3
|
85
|
+
with:
|
86
|
+
node-version: ${{ matrix.node }}
|
87
|
+
- name: Print system information
|
88
|
+
run: |
|
89
|
+
echo "Linux release: "; cat /etc/issue
|
90
|
+
echo "Current user: "; whoami
|
91
|
+
echo "Current directory: "; pwd
|
92
|
+
echo "Ruby version: "; ruby -v
|
93
|
+
echo "Node version: "; node -v
|
94
|
+
echo "Yarn version: "; yarn --version
|
95
|
+
echo "Bundler version: "; bundle --version
|
96
|
+
- name: Save root node_modules to cache
|
97
|
+
uses: actions/cache@v2
|
98
|
+
with:
|
99
|
+
path: node_modules
|
100
|
+
key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
101
|
+
- name: Save root ruby gems to cache
|
102
|
+
uses: actions/cache@v2
|
103
|
+
with:
|
104
|
+
path: vendor/bundle
|
105
|
+
key: v4-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
|
106
|
+
- name: Save dummy app ruby gems to cache
|
107
|
+
uses: actions/cache@v2
|
108
|
+
with:
|
109
|
+
path: spec/dummy/vendor/bundle
|
110
|
+
key: v4-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
|
111
|
+
- name: Save spec/dummy/node_modules to cache
|
112
|
+
uses: actions/cache@v2
|
113
|
+
with:
|
114
|
+
path: spec/dummy/node_modules
|
115
|
+
key: v4-dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/yarn.lock') }}
|
116
|
+
- id: get-sha
|
117
|
+
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
|
118
|
+
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
|
119
|
+
uses: actions/cache@v2
|
120
|
+
with:
|
121
|
+
path: spec/dummy/public/webpack
|
122
|
+
key: v4-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
|
123
|
+
|
124
|
+
- name: Install Node modules with Yarn for renderer package
|
125
|
+
run: |
|
126
|
+
yarn install --no-progress --no-emoji
|
127
|
+
yarn run eslint -v
|
128
|
+
sudo yarn global add yalc
|
129
|
+
- name: yalc publish for react-on-rails
|
130
|
+
run: yalc publish
|
131
|
+
- name: yalc add react-on-rails
|
132
|
+
run: cd spec/dummy && yalc add react-on-rails
|
133
|
+
- name: Install Ruby Gems for package
|
134
|
+
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
135
|
+
- name: Install Ruby Gems for dummy app
|
136
|
+
run: cd spec/dummy && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
137
|
+
- name: Ensure minimum required Chrome version
|
138
|
+
run: |
|
139
|
+
echo -e "Already installed $(google-chrome --version)\n"
|
140
|
+
MINIMUM_REQUIRED_CHROME_VERSION=75
|
141
|
+
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
|
142
|
+
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
|
143
|
+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
144
|
+
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
145
|
+
sudo apt-get update
|
146
|
+
sudo apt-get install google-chrome-stable
|
147
|
+
echo -e "\nInstalled $(google-chrome --version)"
|
148
|
+
fi
|
149
|
+
- name: Touch webpack bundles
|
150
|
+
run: touch spec/dummy/public/webpack/test/*
|
151
|
+
- name: Install yalc globally
|
152
|
+
run: sudo yarn global add yalc
|
153
|
+
- name: Increase the amount of inotify watchers
|
154
|
+
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
155
|
+
- name: Prep for CI
|
156
|
+
run: bundle exec rake prepare_for_ci
|
157
|
+
- name: Main CI
|
158
|
+
run: bundle exec rake ${{ matrix.rake_task }}
|
159
|
+
- name: Store test results
|
160
|
+
uses: actions/upload-artifact@v2
|
161
|
+
with:
|
162
|
+
name: main-rspec
|
163
|
+
path: ~/rspec
|
164
|
+
- name: Store artifacts
|
165
|
+
uses: actions/upload-artifact@v2
|
166
|
+
with:
|
167
|
+
name: dummy-app-capybara
|
168
|
+
path: spec/dummy/tmp/capybara
|
169
|
+
- name: Store artifacts
|
170
|
+
uses: actions/upload-artifact@v2
|
171
|
+
with:
|
172
|
+
name: dummy-app-test-log
|
173
|
+
path: spec/dummy/log/test.log
|
174
|
+
- name: Store artifacts
|
175
|
+
uses: actions/upload-artifact@v2
|
176
|
+
with:
|
177
|
+
name: dummy-app-yarn-log
|
178
|
+
path: spec/dummy/yarn-error.log
|
@@ -0,0 +1,35 @@
|
|
1
|
+
name: JS unit tests for Renderer package
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
node: [12]
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- name: Setup Node
|
14
|
+
uses: actions/setup-node@v1.4.3
|
15
|
+
with:
|
16
|
+
node-version: ${{ matrix.node }}
|
17
|
+
- name: Print system information
|
18
|
+
run: |
|
19
|
+
echo "Linux release: "; cat /etc/issue
|
20
|
+
echo "Current user: "; whoami
|
21
|
+
echo "Current directory: "; pwd
|
22
|
+
echo "Node version: "; node -v
|
23
|
+
echo "Yarn version: "; yarn --version
|
24
|
+
- name: Save root node_modules to cache
|
25
|
+
uses: actions/cache@v2
|
26
|
+
with:
|
27
|
+
path: node_modules
|
28
|
+
key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
29
|
+
- name: Install Node modules with Yarn for renderer package
|
30
|
+
run: |
|
31
|
+
yarn install --no-progress --no-emoji
|
32
|
+
yarn run eslint -v
|
33
|
+
sudo yarn global add yalc
|
34
|
+
- name: Run JS unit tests for Renderer package
|
35
|
+
run: yarn test
|
@@ -0,0 +1,45 @@
|
|
1
|
+
name: Rspec test for gem
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: [2.6]
|
10
|
+
node: [12]
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Setup Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
18
|
+
- name: Print system information
|
19
|
+
run: |
|
20
|
+
echo "Linux release: "; cat /etc/issue
|
21
|
+
echo "Current user: "; whoami
|
22
|
+
echo "Current directory: "; pwd
|
23
|
+
echo "Ruby version: "; ruby -v
|
24
|
+
echo "Node version: "; node -v
|
25
|
+
echo "Yarn version: "; yarn --version
|
26
|
+
echo "Bundler version: "; bundle --version
|
27
|
+
- name: Save root ruby gems to cache
|
28
|
+
uses: actions/cache@v2
|
29
|
+
with:
|
30
|
+
path: vendor/bundle
|
31
|
+
key: v4-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
|
32
|
+
- name: Install Ruby Gems for package
|
33
|
+
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
34
|
+
- name: Run rspec tests
|
35
|
+
run: bundle exec rspec spec/react_on_rails
|
36
|
+
- name: Store test results
|
37
|
+
uses: actions/upload-artifact@v2
|
38
|
+
with:
|
39
|
+
name: main-rspec
|
40
|
+
path: ~/rspec
|
41
|
+
- name: Store artifacts
|
42
|
+
uses: actions/upload-artifact@v2
|
43
|
+
with:
|
44
|
+
name: main-test-log
|
45
|
+
path: log/test.log
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -35,15 +35,19 @@ before_install:
|
|
35
35
|
|
36
36
|
install:
|
37
37
|
- travis_retry gem install bundler -v '>2'
|
38
|
-
- travis_retry nvm install
|
38
|
+
- travis_retry nvm install 14
|
39
39
|
- node -v
|
40
40
|
- travis_retry npm i -g yarn
|
41
|
-
- travis_retry bundle install
|
42
41
|
- travis_retry yarn global add yalc
|
42
|
+
- travis_retry yalc add react-on-rails
|
43
|
+
- travis_retry yarn
|
44
|
+
- travis_retry bundle install
|
45
|
+
- travis_retry yarn run build
|
43
46
|
- travis_retry yalc publish
|
44
|
-
-
|
47
|
+
- cd spec/dummy
|
48
|
+
- travis_retry yalc add react-on-rails
|
45
49
|
- travis_retry yarn
|
46
|
-
-
|
50
|
+
- cd ../..
|
47
51
|
- bundle exec rake prepare_for_ci
|
48
52
|
|
49
53
|
before_script:
|
data/CHANGELOG.md
CHANGED
@@ -11,22 +11,36 @@ We specialize in helping companies to quickly and efficiently move from versions
|
|
11
11
|
## Contributors
|
12
12
|
Please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
|
13
13
|
|
14
|
-
##
|
14
|
+
## Versions
|
15
|
+
### [Unreleased]
|
15
16
|
Changes since last non-beta release.
|
16
17
|
|
17
18
|
*Please add entries here for your pull requests that are not yet released.*
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
### [12.0.3] - 2020-09-20
|
21
|
+
#### Fixed
|
22
|
+
- Async script loading optimizes page load speed. With this fix, a bundle
|
23
|
+
can be loaded "async" and a handler function can determine when to hydrate.
|
24
|
+
For an example of this, see the [docs for loadable-components SSR](https://loadable-components.com/docs/server-side-rendering/#4-add-loadableready-client-side).
|
25
|
+
[PR 1327](https://github.com/shakacode/react_on_rails/pull/1327) by [justin808](https://github.com/justin808).
|
26
|
+
Loadable-Components is supported by [React on Rails Pro](https://www.shakacode.com/react-on-rails-pro).
|
21
27
|
|
22
|
-
### [12.0.
|
23
|
-
|
28
|
+
### [12.0.2] - 2020-07-09
|
29
|
+
#### Fixed
|
30
|
+
- Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/1306) by [justin808](https://github.com/justin808).
|
24
31
|
|
25
|
-
### [12.0.
|
26
|
-
|
32
|
+
### [12.0.1] - 2020-07-09
|
33
|
+
#### Fixed
|
34
|
+
- Changed invocation of webpacker:clean to use a very large number of versions so it does not acidentally delete the server-bundle.js. [PR 1306](https://github.com/shakacode/react_on_rails/pull/1306) by By [justin808](https://github.com/justin808).
|
27
35
|
|
28
|
-
### [12.0.0
|
29
|
-
|
36
|
+
### [12.0.0] - 2020-07-08
|
37
|
+
For upgrade instructions, see [docs/basics/upgrading-react-on-rails.md](./docs/basics/upgrading-react-on-rails.md).
|
38
|
+
|
39
|
+
#### Major Improvements
|
40
|
+
1. **React Hooks Support** for top level components
|
41
|
+
2. **Typescript bindings**
|
42
|
+
3. **rails/webpacker** "just works" with React on Rails by default.
|
43
|
+
4. i18n support for generating a JSON file rather than a JS file.
|
30
44
|
|
31
45
|
#### BREAKING CHANGE
|
32
46
|
In order to solve the issues regarding React Hooks compatibility, the number of parameters
|
@@ -39,10 +53,14 @@ invoked to return the React component. In that case, you won't need to pass any
|
|
39
53
|
See [docs/basics/upgrading-react-on-rails](./docs/basics/upgrading-react-on-rails.md#upgrading-to-v12)
|
40
54
|
for details.
|
41
55
|
|
42
|
-
|
56
|
+
#### Other Updates
|
57
|
+
* `react_on_rails` fully supports `rails/webpacker`. The example test app in `spec/dummy` was recently converted over to use rails/webpacker v4+. It's a good example of how to leverage rails/webpacker's webpack configuration for server-side rendering.
|
58
|
+
* Changed the precompile task to use the rails/webpacker one by default
|
59
|
+
* Updated generators to use React hooks
|
60
|
+
* Requires the use of rails/webpacker view helpers
|
43
61
|
* If the webpacker webpack config files exist, then React on Rails will not override the default
|
44
|
-
assets:precompile setup by rails/webpacker.
|
45
|
-
like config/webpack/production.js
|
62
|
+
assets:precompile setup by rails/webpacker. If you are not using the rails/webpacker setup for webpack,
|
63
|
+
then be sure to remove the JS files inside of config/webpack, like `config/webpack/production.js.`
|
46
64
|
* Removed **env_javascript_include_tag** and **env_stylesheet_link_tag** as these are replaced by view helpers
|
47
65
|
from rails/webpacker
|
48
66
|
* Removal of support for old Rubies and Rails.
|
@@ -62,13 +80,12 @@ for details.
|
|
62
80
|
* Added support to export locales in JSON format. New option added `i18n_output_format` which allows to
|
63
81
|
specify locales format either `JSON` or `JS`. **`JSON` format is now the default.**
|
64
82
|
|
65
|
-
Use this config setting to get the old behavior: config.i18n_output_format = 'js'
|
83
|
+
**Use this config setting to get the old behavior: config.i18n_output_format = 'js'**
|
66
84
|
|
67
85
|
[PR 1271](https://github.com/shakacode/react_on_rails/pull/1271) by [ashgaliyev](https://github.com/ashgaliyev).
|
68
86
|
|
69
|
-
#### Improved
|
70
87
|
- Added Typescript definitions to the Node package. By [justin808](https://github.com/justin808) and [judahmeek](https://github.com/judahmeek) in [PR 1287](https://github.com/shakacode/react_on_rails/pull/1287).
|
71
|
-
- Removed
|
88
|
+
- Removed restriction to keep the server bundle in the same directory with the client bundles. Rails/webpacker 4 has an advanced cleanup that will remove any files in the directory of other webpack files. Removing this restriction allows the server bundle to be created in a sibling directory. By [justin808](https://github.com/shakacode/react_on_rails/pull/1240).
|
72
89
|
|
73
90
|
### [11.3.0] - 2019-05-24
|
74
91
|
#### Added
|
@@ -926,11 +943,11 @@ Best done with Object destructing:
|
|
926
943
|
##### Fixed
|
927
944
|
- Fix several generator related issues.
|
928
945
|
|
929
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/12.0.
|
930
|
-
[12.0.
|
931
|
-
[12.0.
|
932
|
-
[12.0.
|
933
|
-
[12.0.0
|
946
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/12.0.3...master
|
947
|
+
[12.0.3]: https://github.com/shakacode/react_on_rails/compare/12.0.2...12.0.3
|
948
|
+
[12.0.2]: https://github.com/shakacode/react_on_rails/compare/12.0.1...12.0.2
|
949
|
+
[12.0.1]: https://github.com/shakacode/react_on_rails/compare/12.0.0...12.0.1
|
950
|
+
[12.0.0]: https://github.com/shakacode/react_on_rails/compare/11.3.0...12.0.0
|
934
951
|
[11.3.0]: https://github.com/shakacode/react_on_rails/compare/11.2.2...11.3.0
|
935
952
|
[11.2.2]: https://github.com/shakacode/react_on_rails/compare/11.2.1...11.2.2
|
936
953
|
[11.2.1]: https://github.com/shakacode/react_on_rails/compare/11.1.8...11.2.1
|