UNPKG

luhn-generator

Version:

A generator of numbers that passes the validation of Luhn algorithm or Luhn formula, also known as the 'modulus 10' or 'mod 10' algorithm

25 lines (23 loc) 558 B
import path from 'path'; import webpack from 'webpack'; export default { entry: { 'luhn': './src/index.js', 'luhn.min': './src/index.js', }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js', library: 'luhn', libraryTarget: 'umd', umdNamedDefine: true, }, module: { rules: [{ use: 'babel-loader', test: /\.js$/, exclude: /node_modules/ }] }, plugins: [ new webpack.optimize.UglifyJsPlugin({ include: /\.min\.js$/, compress: { warnings: false }, minimize: true, }), ], };