is-vegan
Version:
Is-Vegan is a library which helps you to find out which ingridiends are not vegan
40 lines (36 loc) • 927 B
JavaScript
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const pkg = require('./package.json');
let libraryName = pkg.name;
module.exports = {
entry: './index.js',
devtool: 'source-map',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
library: libraryName,
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
babelrc: true
}
}
}
]
},
target: 'node', // in order to ignore built-in modules like path, fs, etc.
externals: [nodeExternals()], // in order to ignore all modules in node_modules folder
stats: {
colors: true
},
plugins: [new UglifyJsPlugin({ sourceMap: true })]
};