Skip to content

Commit

Permalink
Use TerserPlugin to tell webpack 5 to not extract the banner into a
Browse files Browse the repository at this point in the history
separate file: vexflow-min.js.LICENSE.txt
  • Loading branch information
ronyeh committed Jun 29, 2021
1 parent 5a8c023 commit 5463be0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
const webpack = require('webpack');
const child_process = require('child_process');
const InjectPlugin = require('webpack-inject-plugin').default;
const ENTRY_ORDER = require('webpack-inject-plugin').ENTRY_ORDER;
const TerserPlugin = require('terser-webpack-plugin');

module.exports = (grunt) => {
const BASE_DIR = __dirname;
Expand Down Expand Up @@ -72,6 +72,14 @@ module.exports = (grunt) => {
// Add a banner at the top of the file.
new webpack.BannerPlugin(BANNER),
],
optimization: {
minimizer: [
new TerserPlugin({
// Tell webpack 5 to NOT extract the banner into a separate file.
extractComments: false,
}),
],
},
};
}

Expand Down

0 comments on commit 5463be0

Please sign in to comment.