Skip to content

Commit 3ee6e78

Browse files
Resolve webpack error by reverting back to react@15.3
Remove the try-catch and require the DOM property configs from `react/lib/`. > ERROR in ./lib/property-config.js > Module not found: Error: Cannot resolve module > 'react/lib/HTMLDOMPropertyConfig'
1 parent 63ef15a commit 3ee6e78

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

lib/property-config.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,8 @@
66
var utilities = require('./utilities');
77

88
// HTML and SVG DOM Property Configs
9-
// originally in `react/lib/` but moved to `react-dom/lib/` in 15.4
10-
var HTMLDOMPropertyConfig;
11-
var SVGDOMPropertyConfig;
12-
13-
try {
14-
HTMLDOMPropertyConfig = require('react-dom/lib/HTMLDOMPropertyConfig');
15-
SVGDOMPropertyConfig = require('react-dom/lib/SVGDOMPropertyConfig');
16-
} catch (error) {
17-
HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig');
18-
SVGDOMPropertyConfig = require('react/lib/SVGDOMPropertyConfig');
19-
}
9+
var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig');
10+
var SVGDOMPropertyConfig = require('react/lib/SVGDOMPropertyConfig');
2011

2112
var config = {
2213
html: {},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"webpack": "^1.13.2"
4242
},
4343
"peerDependencies": {
44-
"react": ">=0.14"
44+
"react": "<=15.3"
4545
},
4646
"browser": {
4747
"htmlparser2/lib/Parser": false,

0 commit comments

Comments
 (0)