Skip to content

Commit 96bed98

Browse files
committed
Handle missing 'path' library dependency
Require path instead of assuming it's already imported.
1 parent fe2aa69 commit 96bed98

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/generators/react_on_rails/dev_tests_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def change_webpack_client_base_config_to_include_fallback
4141
// This fixes an issue with resolving 'react' when using a local symlinked version
4242
// of the node_package folder
4343
resolveLoader: {
44-
fallback: [path.join(__dirname, 'node_modules')],
44+
fallback: [require('path').join(__dirname, 'node_modules')],
4545
},
4646
plugins: [
4747
TEXT

spec/dummy/client/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4115,7 +4115,7 @@ react-dom@^15.4.2:
41154115
object-assign "^4.1.0"
41164116

41174117
"react-on-rails@file:../../..":
4118-
version "6.6.0"
4118+
version "6.7.2"
41194119

41204120
react-proxy@^1.1.7:
41214121
version "1.1.8"

spec/react_on_rails/generators/dev_tests_generator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
// This fixes an issue with resolving 'react' when using a local symlinked version
4949
// of the node_package folder
5050
resolveLoader: {
51-
fallback: [path.join(__dirname, 'node_modules')],
51+
fallback: [require('path').join(__dirname, 'node_modules')],
5252
},
5353
plugins: [
5454
...

0 commit comments

Comments
 (0)