如何禁用Webpack输出资产文件夹文件“ SRC”?

我想在构建中禁用Webpack src.js文件。因为它很空,什么也没坐。

(window.webpackJsonp=window.webpackJsonp||[]).push([[3],[],[[39,2,1,0]]]);

这是该文件中唯一的东西。

输出的文件:

mywebsite-vendors.min.b08ecf8da2828e0bd685.js
mywebsite.min.b08ecf8da2828e0bd685.js
runtime.min.b08ecf8da2828e0bd685.js
src.min.b08ecf8da2828e0bd685.js

如何禁用此文件?

部分Webpack代码:

optimization: {
    minimize: ifProduction(true,false),namedmodules: ifDevelopment(true,runtimeChunk: 'single',noEmitOnErrors: true,splitChunks: {
        hidePathInfo: true,chunks: 'all',automaticNameDelimiter: '-',maxAsyncRequests: 6,maxInitialRequests: 4,name: THEME_NAME,cacheGroups: {
            default: {
                enforce: true,priority: 1
            },vendors: {
                test: /[\\/]node_modules[\\/]/,name: `${THEME_NAME}-vendors`,enforce: true,priority: 2,chunks: 'all'
            }
        }
    },minimizer: [
        new TerserPlugin({
            test: /\.js(\?.*)?$/i,cache: true,parallel: true,sourceMap: ifDevelopment(true,extractComments: false,terserOptions: {
                compress: {
                    drop_console: ifProduction(true,false)
                }
            },exclude: /\/node_modules/
        })
    ]
},
youngssss 回答:如何禁用Webpack输出资产文件夹文件“ SRC”?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2884988.html

大家都在问