UNPKG

detect-features

Version:

Detect and report browser and hardware features.

46 lines (38 loc) 936 B
// Vendor const path = require('path'); // Paths const srcPath = path.resolve(__dirname, 'src'); const buildPath = path.resolve(__dirname, 'build'); // Environment const isDevelopment = process.env.NODE_ENV === 'development'; const config = { context: srcPath, devtool: isDevelopment ? 'eval-cheap-module-source-map' : '', entry: './index.js', output: { path: buildPath, filename: !isDevelopment ? 'detect-features.min.js' : 'detect-features.js', library: 'DetectFeatures', libraryTarget: 'umd', umdNamedDefine: true, }, module: { rules: [ { test: /\.js$/, loader: 'babel-loader', options: { plugins: ['transform-object-rest-spread', 'transform-object-assign'], }, }, ], }, resolve: { modules: [path.resolve(__dirname, './node_modules')], }, stats: { colors: true, children: false, }, }; module.exports = config;