url.parse 已被弃用,这会触发许多用户在构建时发出警告,这只是噪音。鉴于我们需要的只是 pathname 属性,很容易用 new URL 替换 (url.parse is deprecated, this triggers a warning for many users on builds that is just noise. Given that all we need is the pathname attribute it is simple to replace with new URL)
url.parse
已被弃用,这会触发许多用户在构建时发出警告,这只是噪音。鉴于我们需要的只是pathname
属性,很容易用new URL
替换 (url.parse
is deprecated, this triggers a warning for many users on builds that is just noise. Given that all we need is thepathname
attribute it is simple to replace withnew URL
)