mirror of
https://github.com/jwadhams/json-logic-js.git
synced 2026-01-25 16:46:46 +00:00
42 lines
803 B
JavaScript
42 lines
803 B
JavaScript
const webpack = require('webpack');
|
|
const path = require('path');
|
|
|
|
/*
|
|
* We've enabled UglifyJSPlugin for you! This minifies your app
|
|
* in order to load faster and run less javascript.
|
|
*
|
|
* https://github.com/webpack-contrib/uglifyjs-webpack-plugin
|
|
*
|
|
*/
|
|
|
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: './src/index',
|
|
|
|
output: {
|
|
filename: 'json-logic.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
library: 'jsonLogic',
|
|
libraryTarget: 'umd',
|
|
umdNamedDefine: true,
|
|
globalObject: 'typeof self !== \'undefined\' ? self : this'
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
presets: ['env']
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
plugins: [new UglifyJSPlugin()]
|
|
};
|