@garbarino/gb-jscommons
Version:
A package of common functions used in our JavaScript applications.
36 lines (33 loc) • 727 B
JavaScript
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const rootFolder = path.join(__dirname, '..');
const config = {
entry: {
"push-notifications": './modules/push-notifications/push-notifications.js',
"other": './modules/other/other.js'
},
output: {
filename: '[name].js',
path: rootFolder + "/dist",
library: ["gbJsCommons", "[name]"],
libraryTarget:'umd'
},
plugins: [
new CleanWebpackPlugin(['dist'], {root: rootFolder})
],
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
}
};
module.exports = config;