mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
webpack 3.5.0 stats.excludeAssets
This commit is contained in:
parent
4d74840177
commit
ec75ed11f6
@ -37,7 +37,12 @@ export default class Builder extends Tapable {
|
|||||||
chunks: false,
|
chunks: false,
|
||||||
children: false,
|
children: false,
|
||||||
modules: false,
|
modules: false,
|
||||||
colors: true
|
colors: true,
|
||||||
|
excludeAssets: [
|
||||||
|
/.map$/,
|
||||||
|
/index\..+\.html$/,
|
||||||
|
/vue-ssr-client-manifest.json/
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper to resolve build paths
|
// Helper to resolve build paths
|
||||||
@ -374,17 +379,8 @@ export default class Builder extends Tapable {
|
|||||||
}
|
}
|
||||||
if (err) return console.error(err) // eslint-disable-line no-console
|
if (err) return console.error(err) // eslint-disable-line no-console
|
||||||
|
|
||||||
// Hide internal assets and source maps in stats
|
|
||||||
const hiddenAssets = [
|
|
||||||
/.map$/,
|
|
||||||
/index\..+\.html$/,
|
|
||||||
/vue-ssr-client-manifest.json/
|
|
||||||
]
|
|
||||||
const statsJson = stats.toJson(this.webpackStats, true)
|
|
||||||
statsJson.assets = statsJson.assets.filter(asset => hiddenAssets.every(e => !e.test(asset.name)))
|
|
||||||
|
|
||||||
// Show build stats for production
|
// Show build stats for production
|
||||||
console.log(stats.constructor.jsonToString(statsJson, true))// eslint-disable-line no-console
|
console.log(stats.toString(this.webpackStats))// eslint-disable-line no-console
|
||||||
|
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (stats.hasErrors()) {
|
if (stats.hasErrors()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user