-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathwebpack.config.js
More file actions
25 lines (24 loc) · 870 Bytes
/
webpack.config.js
File metadata and controls
25 lines (24 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var path = require('path');
module.exports = {
entry: path.resolve(path.join(__dirname, '.', 'index.js')),
output: {
path: path.resolve(path.join(__dirname, '.', 'dist')),
library: 'ReactClipboard',
libraryTarget: 'umd',
filename: 'react-clipboard.js',
globalObject: 'this',
},
module: {
rules: [{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
}],
},
externals: [
{react: {root: 'React', amd: 'react', commonjs: 'react', commonjs2: 'react'}},
{'react-dom': {root: 'ReactDOM', amd: 'react-dom', commonjs: 'react-dom', commonjs2: 'react-dom'}},
{'prop-types': {root: 'PropTypes', amd: 'prop-types', commonjs: 'prop-types', commonjs2: 'prop-types'}},
{clipboard: {root: 'ClipboardJS', amd: 'clipboard', commonjs: 'clipboard', commonjs2: 'clipboard'}},
],
};