33 lines
593 B
JavaScript
33 lines
593 B
JavaScript
|
var path = require('path');
|
||
|
|
||
|
var webpack = require('webpack');
|
||
|
|
||
|
var defs = require('./package.defs.js');
|
||
|
|
||
|
var config = {
|
||
|
devtool: 'source-map',
|
||
|
entry: path.resolve(defs.SRC_DIR, 'index.js'),
|
||
|
output: {
|
||
|
path: defs.LIB_DIR,
|
||
|
filename: defs.FILENAME_DIST,
|
||
|
library: defs.LIBRARY_NAME,
|
||
|
libraryTarget: 'umd',
|
||
|
umdNamedDefine: true
|
||
|
},
|
||
|
externals: {
|
||
|
react: 'react',
|
||
|
'react-dom': 'react-dom'
|
||
|
},
|
||
|
module: {
|
||
|
loaders: [
|
||
|
{
|
||
|
test: /\.js?/,
|
||
|
include: [defs.SRC_DIR],
|
||
|
loader: ['babel-loader']
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports = config;
|