forked from seethroughdev/react-ux-password-field
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (40 loc) · 1.02 KB
/
webpack.config.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var path = require('path');
var webpack = require('webpack');
var banner = require('./src/js/banner');
module.exports = {
// the entry point of your library
entry: './src/index.js',
// where 3rd-party modules can reside
resolve: {
modulesDirectories: ['node_modules', 'bower_components']
},
output: {
// where to put standalone build file
path: path.join(__dirname, 'lib'),
// the name of the standalone build file
filename: 'react-ux-password-field.js',
// the standalone build should be wrapped in UMD for interop
libraryTarget: 'umd',
// the name of your library in global scope
library: 'react-ux-password-field'
},
externals: [
{
'react': {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
}
],
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader'},
{ test: /\.png/, loader: "url?limit=100000&mimetype=image/png" }
]
},
plugins: [
new webpack.BannerPlugin(banner)
]
};