Skip to content

Commit

Permalink
fix: fix stats display when chunkFilename contains query string (vuej…
Browse files Browse the repository at this point in the history
  • Loading branch information
flyhope authored and haoqunjiang committed Jul 29, 2019
1 parent fc3e0a3 commit 42ecd08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@vue/cli-service/lib/commands/build/formatStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 42ecd08

Please sign in to comment.