I'm using Webpack 5 and along with the bundle.js
file a bundle.js.LICENSE.txt
file is created which is not needed, because https://github.com/codepunkt/webpack-license-plugin is used for this task.
Is there any way to configure Webpack to omit the creation of LICENSE.txt
files?
I've searched the webpack docs, SO and several issues on GitHub but didn't find anything helpful.
Webpack enables use of loaders to preprocess files. This allows you to bundle any static resource way beyond JavaScript. You can easily write your own loaders using Node.js.
The first release of LICENSE.txt for the Windows 8.1 platform was on 10/18/2013 for Windows 8.1. The latest file version for Adobe Photoshop Elements 2020 is v2020 released on 10/01/2019. LICENSE.txt is included in Adobe Photoshop Elements 2020, Microsoft Office PowerPoint 2010 14, and 7-Zip 19.
Your LICENSE.txt file could be missing due to accidental deletion, uninstalled as a shared file of another program (shared with Adobe Photoshop Elements), or deleted by a malware infection.
LICENSE.txt is considered a type of Plain Text file. It is most-commonly used in Adobe Photoshop Elements 2020 developed by Adobe Systems Incorporated. It uses the TXT file extension and is considered a Text (Plain Text) file. The first release of LICENSE.txt for the Windows 8.1 platform was on 10/18/2013 for Windows 8.1.
Add extractComments: false
to webpack.config.js
const TerserPlugin = require('terser-webpack-plugin');
.
.
.
module.exports = {
.
.
.
optimization: {
minimizer: [new TerserPlugin({
extractComments: false,
})],
},
.
.
.
};
To properly remove both the license file and the comments inside the bundle use:
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
format: {
comments: false,
},
},
}),
],
},
https://github.com/webpack-contrib/terser-webpack-plugin#remove-comments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With