Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mixins/verbose.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ const helper = require('../config-helper');
const VerboseLogPlugin = require('../plugins/VerboseLogPlugin');

module.exports = {
apply: function (config) {
apply: function (config, opts = {}) {
const prerenderInstance = helper.getPluginByName(config, 'PrerenderPlugin');
const snapshotPluginInstance = helper.getPluginByName(config, 'SnapshotPlugin');

return config.plugins.push(
new VerboseLogPlugin({
prerenderPlugin: prerenderInstance && prerenderInstance.constructor,
ProgressPlugin: opts.ProgressPlugin,
snapshotPlugin: snapshotPluginInstance && snapshotPluginInstance.constructor
})
);
Expand Down
84 changes: 42 additions & 42 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@
"html-webpack-plugin": "^5.3.2",
"prettier": "^2.6.0",
"react": "^17.0.2",
"webpack": "^5.64.4"
"webpack": "5.64.4"
}
}
2 changes: 1 addition & 1 deletion plugins/VerboseLogPlugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const path = require('path');
const {Instance: Chalk} = require('chalk');
const {ProgressPlugin} = require('webpack');

class VerboseLogPlugin {
constructor(options = {}) {
Expand All @@ -12,6 +11,7 @@ class VerboseLogPlugin {

apply(compiler) {
const opts = this.options;
const {ProgressPlugin} = opts;
const columns = this.options.stream.isTTY && this.options.stream.columns;
const chalk = new Chalk({enabled: !!this.options.stream.isTTY});
let active;
Expand Down