UNPKG

react-webcam-capture

Version:

react-webcam-capture is Multimedia capturing module via React, using HTML5 MediaDevice and MediaRecorder API

57 lines (55 loc) 1.18 kB
const path = require('path') const webpack = require('webpack') module.exports = { entry: [ 'whatwg-fetch', './src/index.js' ], externals: [{ react: { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' } }], output: { path: path.join(__dirname, 'dist'), filename: 'webcam-capture.js', libraryTarget: 'umd' }, module: { rules: [{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', options: { presets: ['es2015', 'react', 'stage-2'] } }] }, plugins: [ new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production') } }), new webpack.optimize.UglifyJsPlugin({ mangle: true, compress: { warnings: false, pure_getters: true, unsafe: true, unsafe_comps: true, screw_ie8: true }, output: { comments: false, }, exclude: [/\.min\.js$/gi] }), new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/]), new webpack.NoEmitOnErrorsPlugin(), new webpack.optimize.AggressiveMergingPlugin() ] }