react-datepicker2-elhampour
Version:
react datepicker component. (include persian jalaali calendar)
38 lines (36 loc) • 893 B
JavaScript
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
filename: 'index.js',
library: 'react-datepicker2'
},
externals: {
'react': {
'commonjs': 'react',
'commonjs2': 'react',
'amd': 'react',
// React dep should be available as window.React, not window.react
'root': 'React'
},
'react-dom': {
'commonjs': 'react-dom',
'commonjs2': 'react-dom',
'amd': 'react-dom',
'root': 'ReactDOM'
}
},
module: {
loaders: [
{
test: /\.(js|jsx)$/, loader: 'babel-loader', exclude: /node_modules/, query: {
plugins: ['transform-runtime'],
presets: ['es2015', 'stage-0', 'react'],
}
}
]
}
}