UNPKG

react-datepicker-cy

Version:

react datepicker component. (include persian jalaali calendar)

44 lines (42 loc) 1.01 kB
const path = require('path'); const webpack = require('webpack'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin') module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), libraryTarget: 'umd', filename: 'index.js', library: 'react-datepicker-cy' }, 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'], } } ] }, plugins: [ new UglifyJsPlugin({ sourceMap: true, }) ] }