react_on_rails 13.3.2 → 13.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +19 -0
- data/CHANGELOG.md +1 -1
- data/Gemfile.development_dependencies +2 -2
- data/docs/guides/rails-webpacker-react-integration-options.md +30 -0
- data/lib/generators/react_on_rails/bin/dev +1 -1
- data/lib/generators/react_on_rails/bin/dev-static +1 -1
- data/lib/react_on_rails/helper.rb +2 -2
- data/lib/react_on_rails/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68dc51cc2eb837fd5ff976cdba5aeaefdec1ca13540e574e8f4e2ec054ec8769
|
4
|
+
data.tar.gz: 80d926e7a845cb55f27763de6050b3b4d3f829323b46362ca6f3e92a1daac3aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea748cde016bbdae69f2ffa4047324fdd9d2426413e1baf4e5adf9043e6540f4fbcf0d4ec2237ec4854d79eab257b9022afc91576bb9517cf5e2ae2490f06777
|
7
|
+
data.tar.gz: a5c39c15e12231ad30bb15ef56517092cc50d368cd477d4653a4fad57b4f91c4b33143058718f09129623afd46ef81639b3f8add303b1125e4926641cc0b5c54
|
@@ -0,0 +1,19 @@
|
|
1
|
+
### Summary
|
2
|
+
|
3
|
+
_Remove this paragraph and provide a general description of the code changes in your pull
|
4
|
+
request... were there any bugs you had fixed? If so, mention them. If
|
5
|
+
these bugs have open GitHub issues, be sure to tag them here as well,
|
6
|
+
to keep the conversation linked together._
|
7
|
+
|
8
|
+
### Pull Request checklist
|
9
|
+
_Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by `~`._
|
10
|
+
|
11
|
+
- [ ] Add/update test to cover these changes
|
12
|
+
- [ ] Update documentation
|
13
|
+
- [ ] Update CHANGELOG file
|
14
|
+
_Add the CHANGELOG entry at the top of the file._
|
15
|
+
|
16
|
+
### Other Information
|
17
|
+
|
18
|
+
_Remove this paragraph and mention any other important and relevant information such as benchmarks._
|
19
|
+
|
data/CHANGELOG.md
CHANGED
@@ -65,7 +65,7 @@ Changes since last non-beta release.
|
|
65
65
|
|
66
66
|
- Fixed the `You are importing hydrateRoot from "react-dom" [...] You should instead import it from "react-dom/client"` warning under React 18 ([#1441](https://github.com/shakacode/react_on_rails/issues/1441)). [PR 1460](https://github.com/shakacode/react_on_rails/pull/1460) by [alexeyr](https://github.com/alexeyr).
|
67
67
|
|
68
|
-
In exchange, you may see a warning like this when building
|
68
|
+
In exchange, you may see a warning like this when building using any version of React below 18:
|
69
69
|
```
|
70
70
|
WARNING in ./node_modules/react-on-rails/node_package/lib/reactHydrateOrRender.js19:25-52
|
71
71
|
Module not found: Error: Can't resolve 'react-dom/client' in '/home/runner/work/react_on_rails/react_on_rails/spec/dummy/node_modules/react-on-rails/node_package/lib'
|
@@ -29,8 +29,8 @@ group :development, :test do
|
|
29
29
|
gem "pry-rails"
|
30
30
|
gem "pry-rescue"
|
31
31
|
gem "rubocop", "1.14.0", require: false
|
32
|
-
gem "rubocop-performance",
|
33
|
-
gem "rubocop-rspec",
|
32
|
+
gem "rubocop-performance", require: false
|
33
|
+
gem "rubocop-rspec", require: false
|
34
34
|
gem "scss_lint", require: false
|
35
35
|
gem "spring", "~> 4.0"
|
36
36
|
end
|
@@ -56,6 +56,36 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
56
56
|
|
57
57
|
----
|
58
58
|
|
59
|
+
## Suppress warning related to Can't resolve 'react-dom/client' in React < 18
|
60
|
+
|
61
|
+
You may see a warning like this when building a Webpack bundle using any version of React below 18:
|
62
|
+
|
63
|
+
```
|
64
|
+
Module not found: Error: Can't resolve 'react-dom/client' in ....
|
65
|
+
```
|
66
|
+
|
67
|
+
It can be safely [suppressed](https://webpack.js.org/configuration/other-options/#ignorewarnings) in your Webpack configuration. The following is an example of this suppression in `config/webpack/commonWebpackConfig.js`:
|
68
|
+
|
69
|
+
```js
|
70
|
+
const { webpackConfig: baseClientWebpackConfig, merge } = require('shakapacker');
|
71
|
+
|
72
|
+
const commonOptions = {
|
73
|
+
resolve: {
|
74
|
+
extensions: ['.css', '.ts', '.tsx'],
|
75
|
+
},
|
76
|
+
};
|
77
|
+
|
78
|
+
const ignoreWarningsConfig = {
|
79
|
+
ignoreWarnings: [/Module not found: Error: Can't resolve 'react-dom\/client'/],
|
80
|
+
};
|
81
|
+
|
82
|
+
const commonWebpackConfig = () => merge({}, baseClientWebpackConfig, commonOptions, ignoreWarningsConfig);
|
83
|
+
|
84
|
+
module.exports = commonWebpackConfig;
|
85
|
+
```
|
86
|
+
|
87
|
+
----
|
88
|
+
|
59
89
|
## HMR and React Hot Reloading
|
60
90
|
|
61
91
|
Before turning HMR on, consider upgrading to the latest stable gems and packages:
|
@@ -324,8 +324,8 @@ module ReactOnRails
|
|
324
324
|
|
325
325
|
ReactOnRails::WebpackerUtils.raise_nested_entries_disabled unless ReactOnRails::WebpackerUtils.nested_entries?
|
326
326
|
|
327
|
-
|
328
|
-
|
327
|
+
append_javascript_pack_tag "generated/#{component_name}"
|
328
|
+
append_stylesheet_pack_tag "generated/#{component_name}"
|
329
329
|
end
|
330
330
|
|
331
331
|
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.3.
|
4
|
+
version: 13.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- ".github/FUNDING.yml"
|
125
125
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
126
126
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
127
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
127
128
|
- ".github/workflows/lint-js-and-ruby.yml"
|
128
129
|
- ".github/workflows/main.yml"
|
129
130
|
- ".github/workflows/package-js-tests.yml"
|