Webpack在编译甚至'stats:false'集时输出了大量消息

Webpack在编译甚至'stats:false'集时输出了大量消息,webpack,silent,verbose,Webpack,Silent,Verbose,我需要在远程服务器的docker构建过程中构建它,所有输出消息都将在空闲通道中打印。部署过程在服务器中停止,但由于输出消息很长,我无法检查哪部分出错。我需要把它藏起来 下面是命令:NODE\u ENV=production NODE\u modules/.bin/webpack--config webpack.config.js--hide modules 和配置: 'use strict'; const path = require('path'); const glob = require(

我需要在远程服务器的docker构建过程中构建它,所有输出消息都将在空闲通道中打印。部署过程在服务器中停止,但由于输出消息很长,我无法检查哪部分出错。我需要把它藏起来

下面是命令:
NODE\u ENV=production NODE\u modules/.bin/webpack--config webpack.config.js--hide modules

和配置:

'use strict';
const path = require('path');
const glob = require('glob');
const webpack = require('webpack');
const OptimizeJsPlugin = require('optimize-js-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const LiveReloadPlugin = require('webpack-livereload-plugin');

const configs = [{
    entry: {
        // 'main': './scripts/boot.aot.ts',
        'jit': './scripts/boot.jit.ts',
        // 'boot.common': './scripts/boot.common.ts'
    },
    context: path.join(process.cwd(), '.'),
    output: {
        path: path.join(process.cwd(), 'public-html/dist'),
        filename: '[name].js'
    },
    module: {
        rules: [{
            test: /\.ts$/,
            use: ['awesome-typescript-loader', 'angular2-template-loader']
        }, {
            test: /\.html$/,
            use: 'html-loader?minimize=false'
        }]
    },
    plugins: [
        new webpack.ProgressPlugin(),
        new webpack.ContextReplacementPlugin(
            // The (\\|\/) piece accounts for path separators in *nix and Windows
            /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
            path.join(process.cwd(), '.')
        ),
        new webpack.ProvidePlugin({
            $: "jquery",
            jQuery: "jquery",
            "window.jQuery": "jquery"
        })
    ],
    resolve: {
        modules: [
            'node_modules',
            path.resolve(process.cwd(), '.')
        ],
        alias: {
            'jquery': require.resolve('jquery'),
        },
        extensions: ['.ts', '.js']
    },
    stats: false,
    performance: {
        hints: false
    }
}, {
    name: 'styles',
    entry: {
        'main': './styles/layout.scss',
    },
    output: {
        path: path.join(process.cwd(), 'public-html/dist'),
        filename: '[name].js',
    },
    module: {
        rules: [
            {
                test: /\.scss$/,
                use: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: [
                        'css-loader?minimize=true!',
                        {
                            loader: 'sass-loader',
                            options: {
                                // Special config for Material Component SCSS importing
                                includePaths: ['node_modules'].map((d) => {
                                    return path.join(__dirname, d);
                                })
                            }
                        }
                    ]
                }),
            },
            { test: /\.css$/, loader: 'style-loader!css-loader?minimize=true' },
            { test: /\.(gif|png|jpe?g)$/i, loader: 'file-loader?name=dist/images/[name].[ext]' },
            { test: /\.woff2?$/, loader: 'url-loader?name=fonts/[name].[ext]&limit=10000&mimetype=application/font-woff' },
            { test: /\.(ttf|eot|svg)$/, loader: 'file-loader?name=fonts/[name].[ext]' },
        ],
    },
    plugins: [
        new ExtractTextPlugin({
            filename: '[name].css',
        }),
        new LiveReloadPlugin()
    ],
}];

if (process.env.NODE_ENV !== 'production') {
    configs[0].devtool = false;
    // 'source-map';
    configs[0].plugins = configs[0].plugins.concat([
        new webpack.DefinePlugin({
            'WEBPACK_ENV': '"dev"'
        })
    ]);
} else {
    configs[0].devtool = false;
    configs[0].plugins = configs[0].plugins.concat([
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                screw_ie8: true,
                warnings: false,
            },
            comments: false,
            sourceMap: false,
        }),
        new OptimizeJsPlugin({
            sourceMap: false,
        }),
        new webpack.DefinePlugin({
            WEBPACK_ENV: '"production"',
        }),
    ]);
}

module.exports = configs;
和tsconfig.js

{
    "compilerOptions": {
        "baseUrl": "./",
        "target": "es5",
        "module": "es2015",
        "moduleResolution": "node",
        "declaration": true,
        "noImplicitAny": false,
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "outDir": "./dist",
        "rootDir": "./",
        "skipLibCheck": true,
        "typeRoots": [
            "./node_modules/@types",
            "./typings"
        ],
        "types": [
            "node",
            "jquery",
            "gapi",
            "gapi.auth2"
        ],
        "lib": [
            "dom",
            "es2015"
        ]
    },
    "compileOnSave": false,
    "buildOnSave": false,
    "files": [
        "./typings/hb-ng2-sdk.d.ts",
        "./scripts/module.ts"
    ],
    "exclude": [
        "node_modules",
        "dist",
        "**/*.ngfactory.ts",
        "**/*.shim.ts"
    ],
    "awesomeTypescriptLoaderOptions": {
        "useBabel": true,
        "useCache": true,
        "silent": true
    },
    "angularCompilerOptions": {
        "genDir": "./aot",
        "skipMetadataEmit" : false,
        "entryModule": "scripts/module#AppModule"
    }
}

您是否只需要在开发模式中查看错误?您使用的网页包的哪个版本?3.8.1如果我记得正确,您是否只需要在开发模式中查看错误?您使用的网页包的哪个版本?3.8.1如果我记得正确