File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 1- // eslint-disable-next-line n/prefer-node-protocol
2- import Url from "url" ;
31import PropTypes from "prop-types" ;
42
53const baseURL = "https://github.com/webpack/webpack.js.org/edit/main/" ;
@@ -21,8 +19,7 @@ function _handlePrintClick(event) {
2119}
2220
2321export default function PageLinks ( { page = { } } ) {
24- // eslint-disable-next-line n/no-deprecated-api
25- const editLink = page . edit || Url . resolve ( baseURL , page . path ) ;
22+ const editLink = page . edit || new URL ( page . path , baseURL ) . href ;
2623
2724 return (
2825 < div className = "print:hidden mt-8" >
Original file line number Diff line number Diff line change 1- import url from "node:url" ;
21import { excludedLoaders , excludedPlugins } from "./constants.mjs" ;
32
43const beginsWithDocsDomainRegex = / ^ (?: h t t p s ? : ) \/ \/ w e b p a c k \. j s \. o r g / ;
@@ -40,8 +39,7 @@ function linkFixerFactory(sourceUrl) {
4039 . replace ( / r a w .g i t h u b u s e r c o n t e n t .c o m / , "github.com" )
4140 . replace ( / m a s t e r / , "blob/master" ) ;
4241
43- // eslint-disable-next-line n/no-deprecated-api
44- href = url . resolve ( renderedUrl , href ) ;
42+ href = new URL ( href , renderedUrl ) . href ;
4543 }
4644
4745 // Modify absolute documentation links to be root relative
You can’t perform that action at this time.
0 commit comments