Skip to content

Commit e64230c

Browse files
committed
[fixed] Don't include react-dom in the bundles
1 parent 9a27434 commit e64230c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

docs/src/GettingStartedPage.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,14 @@ import { Button } from 'react-bootstrap';`
8585
</div>
8686

8787
<h3><Anchor id="browser-globals">Browser globals</Anchor></h3>
88-
<p>The Bower repo contains <code>react-bootstrap.js</code> and <code>react-bootstrap.min.js</code> with all components exported in the <code>window.ReactBootstrap</code> object.</p>
88+
<p>We provide <code>react-bootstrap.js</code> and <code>react-bootstrap.min.js</code> bundles with all components exported on the <code>window.ReactBootstrap</code> object. These bundles are available on <a href="https://cdnjs.com/libraries/react-bootstrap">CDNJS</a>, and in both the Bower and NPM packages.</p>
8989
<div className="highlight">
9090
<CodeExample
9191
mode="htmlmixed"
9292
codeText={
93-
`<script src="https://cdnjs.cloudflare.com/ajax/libs/react/<react-version>/react.js"></script>
94-
<script src="path/to/react-bootstrap-bower/react-bootstrap.min.js"></script>
93+
`<script src="https://cdnjs.cloudflare.com/ajax/libs/react/<react-version>/react.min.js"></script>
94+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/<react-version>/react-dom.min.js"></script>
95+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/<version>/react-bootstrap.min.js"></script>
9596
<script>
9697
var Alert = ReactBootstrap.Alert;
9798
</script>`

webpack/webpack.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ export default _.extend({}, baseConfig, {
2121
commonjs: 'react',
2222
amd: 'react'
2323
}
24+
},
25+
{
26+
'react-dom': {
27+
root: 'ReactDOM',
28+
commonjs2: 'react-dom',
29+
commonjs: 'react-dom',
30+
amd: 'react-dom'
31+
}
2432
}
2533
]
2634
});

0 commit comments

Comments
 (0)