Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 网页包-省略LICENSE.txt文件的创建_Webpack - Fatal编程技术网

Webpack 网页包-省略LICENSE.txt文件的创建

Webpack 网页包-省略LICENSE.txt文件的创建,webpack,Webpack,我正在使用Webpack 5和bundle.js文件,创建了一个bundle.js.LICENSE.txt文件,该文件不需要,因为用于此任务 有没有办法将Webpack配置为不创建LICENSE.txt文件 我在GitHub上搜索了webpack文档,以及其他一些问题,但没有找到任何有用的信息。webpack文档中只有这个 这帮助我摆脱了LICENSE.txt将extractComments:false添加到webpack.config.js const TerserPlugin=requi

我正在使用Webpack 5和
bundle.js
文件,创建了一个
bundle.js.LICENSE.txt
文件,该文件不需要,因为用于此任务

有没有办法将Webpack配置为不创建
LICENSE.txt
文件


我在GitHub上搜索了webpack文档,以及其他一些问题,但没有找到任何有用的信息。

webpack文档中只有这个


这帮助我摆脱了LICENSE.txt

extractComments:false
添加到
webpack.config.js


const TerserPlugin=require('terser-webpack-plugin');
.
.
.
module.exports={
.
.
.
优化:{
最小化:[新的TerserPlugin({
评论:错,
})],
},
.
.
.
};

当我从
package.json
中删除许可证道具时,这种情况发生在我身上。当我重新添加时,它似乎不再为
.js
文件生成此许可证文件,而是为编译成js的
.tsx
文件生成此许可证文件
extractComments: false