Skip to content

Commit bb2e3e7

Browse files
flyhopehaoqunjiang
authored andcommitted
fix: fix stats display when chunkFilename contains query string (#4359)
(cherry picked from commit 42ecd08)
1 parent fb738a2 commit bb2e3e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/@vue/cli-service/lib/commands/build/formatStats.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = function formatStats (stats, dir, api) {
44
const zlib = require('zlib')
55
const chalk = require('chalk')
66
const ui = require('cliui')({ width: 80 })
7+
const url = require('url');
78

89
const json = stats.toJson({
910
hash: false,
@@ -20,6 +21,10 @@ module.exports = function formatStats (stats, dir, api) {
2021
const isCSS = val => /\.css$/.test(val)
2122
const isMinJS = val => /\.min\.js$/.test(val)
2223
assets = assets
24+
.map(a => {
25+
a.name = url.parse(a.name).pathname
26+
return a
27+
})
2328
.filter(a => {
2429
if (seenNames.has(a.name)) {
2530
return false

0 commit comments

Comments
 (0)