Skip to content

Commit

Permalink
fix(lib): replace "url" module with simple string split (close vuejs#…
Browse files Browse the repository at this point in the history
…4667) (vuejs#4809)

* fix(lib): replace "url" module with simple string split (close vuejs#4667)

Fixes issue vuejs#4667 by implementing the proposal vuejs#4667 (comment)
Also gets rid of a node module by using simpler code for removing eventual GET parameters

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

Co-Authored-By: Haoqun Jiang <haoqunjiang@gmail.com>
  • Loading branch information
RSeidelsohn and haoqunjiang committed Nov 8, 2019
1 parent 1e663df commit 26c4899
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/@vue/cli-service/lib/commands/build/formatStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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 @@ -22,7 +21,7 @@ module.exports = function formatStats (stats, dir, api) {
const isMinJS = val => /\.min\.js$/.test(val)
assets = assets
.map(a => {
a.name = url.parse(a.name).pathname
a.name = a.name.split('?')[0]
return a
})
.filter(a => {
Expand Down

0 comments on commit 26c4899

Please sign in to comment.