refactor: stats

This commit is contained in:
cha0s 2024-02-06 08:12:26 -06:00
parent 2289f27b97
commit e7511e7ee4
7 changed files with 9 additions and 15 deletions

View File

@ -74,8 +74,7 @@ module.exports = async (env, argv, flecks) => {
modules: ['node_modules'],
},
stats: {
colors: true,
errorDetails: true,
preset: 'minimal',
},
target: 'node',
});

View File

@ -53,8 +53,7 @@ exports.defaultConfig = (flecks, specializedConfig) => {
modules: ['node_modules'],
},
stats: {
colors: true,
errorDetails: true,
preset: 'minimal',
},
};
return 'function' === typeof specializedConfig

View File

@ -10,8 +10,7 @@ exports.hooks = {
* Webpack stats configuration.
*/
stats: {
colors: true,
errorDetails: true,
preset: 'minimal',
},
}),
'@flecks/build.targets': () => (

View File

@ -46,8 +46,7 @@ exports.hooks = {
* Webpack stats configuration.
*/
stats: {
colors: true,
errorDetails: true,
preset: 'minimal',
},
}),
'@flecks/build.targets': () => ['server'],

View File

@ -33,10 +33,10 @@ module.exports = async (env, argv, flecks) => {
banner({banner: "require('source-map-support').install();"}),
],
stats: {
...flecks.get('@flecks/server.stats'),
warningsFilter: [
/Failed to parse source map/,
],
...flecks.get('@flecks/server.stats'),
},
target: 'node',
});

View File

@ -244,8 +244,7 @@ exports.hooks = {
* (webpack-dev-server) Webpack stats output.
*/
devStats: {
colors: true,
errorDetails: true,
preset: 'minimal',
},
/**
* Modules to externalize using `webpack.DllPlugin`.
@ -278,8 +277,7 @@ exports.hooks = {
* Webpack stats configuration.
*/
stats: {
colors: true,
errorDetails: true,
preset: 'minimal',
},
/**
* HTML title.

View File

@ -164,10 +164,10 @@ module.exports = async (env, argv, flecks) => {
compress: false,
devMiddleware: {
stats: {
...devStats,
warningsFilter: [
/Failed to parse source map/,
],
...devStats,
},
},
historyApiFallback: {
@ -234,10 +234,10 @@ module.exports = async (env, argv, flecks) => {
},
},
stats: {
...flecks.get('@flecks/web.stats'),
warningsFilter: [
/Failed to parse source map/,
],
...flecks.get('@flecks/web.stats'),
},
target: 'web',
});