mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-14 05:01:26 -05:00
fix: fix stats display when chunkFilename contains query string (#4359)
(cherry picked from commit 42ecd08d35)
This commit is contained in:
@@ -4,6 +4,7 @@ module.exports = function formatStats (stats, dir, api) {
|
||||
const zlib = require('zlib')
|
||||
const chalk = require('chalk')
|
||||
const ui = require('cliui')({ width: 80 })
|
||||
const url = require('url');
|
||||
|
||||
const json = stats.toJson({
|
||||
hash: false,
|
||||
@@ -20,6 +21,10 @@ module.exports = function formatStats (stats, dir, api) {
|
||||
const isCSS = val => /\.css$/.test(val)
|
||||
const isMinJS = val => /\.min\.js$/.test(val)
|
||||
assets = assets
|
||||
.map(a => {
|
||||
a.name = url.parse(a.name).pathname
|
||||
return a
|
||||
})
|
||||
.filter(a => {
|
||||
if (seenNames.has(a.name)) {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user