Skip to content

Commit

Permalink
[fixed] Don't include react-dom in the bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Oct 8, 2015
1 parent 9a27434 commit e64230c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/src/GettingStartedPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,14 @@ import { Button } from 'react-bootstrap';`
</div>

<h3><Anchor id="browser-globals">Browser globals</Anchor></h3>
<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>
<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>
<div className="highlight">
<CodeExample
mode="htmlmixed"
codeText={
`<script src="https://cdnjs.cloudflare.com/ajax/libs/react/<react-version>/react.js"></script>
<script src="path/to/react-bootstrap-bower/react-bootstrap.min.js"></script>
`<script src="https://cdnjs.cloudflare.com/ajax/libs/react/<react-version>/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/<react-version>/react-dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/<version>/react-bootstrap.min.js"></script>
<script>
var Alert = ReactBootstrap.Alert;
</script>`
Expand Down
8 changes: 8 additions & 0 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ export default _.extend({}, baseConfig, {
commonjs: 'react',
amd: 'react'
}
},
{
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom'
}
}
]
});

0 comments on commit e64230c

Please sign in to comment.