Skip to content

Commit 91bc945

Browse files
committed
Remove prop-types from being bundled and support commonjs only
1 parent 5ff6f22 commit 91bc945

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ View the [demo](http://mderrick.github.io/react-html5video/).
2020

2121
- `react@>=15.0.x`
2222
- `react-dom@>=15.0.x`
23+
- `prop-types@>=15.0.x`
2324

2425
## Usage
2526

generateConfig.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,16 @@ module.exports = (options = {}) => {
1515
output: {
1616
path: options.outputPath || distPath,
1717
filename: 'index.js',
18-
libraryTarget: 'umd',
18+
libraryTarget: 'commonjs2',
1919
library: pkg.name
2020
},
2121
resolve: {
2222
extensions: ['.js', '.json', '.jsx', '']
2323
},
2424
externals: [{
25-
react: {
26-
root: 'React',
27-
commonjs2: 'react',
28-
commonjs: 'react',
29-
amd: 'react'
30-
},
31-
'react-dom': {
32-
root: 'ReactDOM',
33-
commonjs2: 'react-dom',
34-
commonjs: 'react-dom',
35-
amd: 'react-dom'
36-
}
25+
react: 'react',
26+
'react-dom': 'react-dom',
27+
'prop-types': 'prop-types'
3728
}],
3829
module: {
3930
loaders: [{

0 commit comments

Comments
 (0)