UNPKG

react-awesome-button-namdaoduy

Version:

Performant, extendable, highly customisable, production ready React Component that renders an animated basic set of UI buttons

51 lines (48 loc) 1.05 kB
const webpack = require('webpack'); const path = require('path'); const config = { entry: { index: ['./src/index.js'], }, output: { path: path.resolve(__dirname, 'dist'), filename: '[name].js', libraryTarget: 'umd', library: 'react-awesome-button-namdaoduy', }, externals: { react: { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react', }, 'prop-types': { root: 'PropTypes', commonjs: 'prop-types', commonjs2: 'prop-types', amd: 'prop-types', }, }, module: { rules: [{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', options: { presets: ['es2015', 'react', 'stage-0'], }, }], }, plugins: [ new webpack.optimize.UglifyJsPlugin({ comments: false, }), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production'), }, }), ], }; module.exports = config;