From 1a7842492a3b2dfe160c441c5104d497386503e5 Mon Sep 17 00:00:00 2001 From: JelteMX Date: Fri, 14 Jan 2022 15:12:07 +0100 Subject: [PATCH] Include banner --- package.json | 2 +- webpack.config.prod.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b49c5ad..b33e4d9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "1.4.1", "description": "Drop files in your Mendix Application", "copyright": "Mendix 2020", - "author": "Jelte Lagendijk", + "author": "Jelte Lagendijk ", "config": { "widgetPath": "./dist/MxTestProject/widgets", "projectPath": "./dist/MxTestProject/", diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 3cd1853..e2da8f3 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -2,6 +2,7 @@ const merge = require("webpack-merge"); const webpack = require("webpack"); const path = require("path"); const baseConfig = require("./node_modules/@mendix/pluggable-widgets-tools/configs/webpack.config.prod.js");//Can also be webpack.config.prod.js +const pkg = require('./package.json'); const TerserPlugin = require("terser-webpack-plugin"); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; @@ -49,7 +50,10 @@ const terserPlugin = new TerserPlugin({ mangle: true, // Note `mangle.properties` is `false` by default. module: false, output: { - comments: false + comments: false, + beautify: false, + preamble: `/* FileDropper for Mendix || Version ${pkg.version} || Apache 2 LICENSE || Developer: ${pkg.author} || Please report any issues here: https://github.com/mendixlabs/mendix-file-dropper/issues */\n` + // comments: false }, toplevel: false, nameCache: null,