Skip to content

Commit 82655fa

Browse files
authored
Merge pull request #304 from iclanton/fix-deprecation
Resolve a deprecation warning during the build.
1 parent d1214d3 commit 82655fa

3 files changed

Lines changed: 44 additions & 3 deletions

File tree

common/config/rush/pnpm-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@
361361
"globalPatchedDependencies": {
362362
"typesense-docsearch-react@0.2.3": "patches/typesense-docsearch-react@0.2.3.patch",
363363
"@docusaurus/theme-classic@2.3.1": "patches/@docusaurus__theme-classic@2.3.1.patch",
364-
"docusaurus-theme-search-typesense@0.9.0": "patches/docusaurus-theme-search-typesense@0.9.0.patch"
364+
"docusaurus-theme-search-typesense@0.9.0": "patches/docusaurus-theme-search-typesense@0.9.0.patch",
365+
"react-loadable-ssr-addon-v5-slorber": "patches/react-loadable-ssr-addon-v5-slorber.patch"
365366
},
366367

367368
/**

common/config/rush/pnpm-lock.yaml

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/lib/ReactLoadableSSRAddon.js b/lib/ReactLoadableSSRAddon.js
2+
index 80b1d3e073351c0ef78c408de9fa50f66dcdb363..9a744db26769d8e64636b5db6efa5792bb152613 100644
3+
--- a/lib/ReactLoadableSSRAddon.js
4+
+++ b/lib/ReactLoadableSSRAddon.js
5+
@@ -13,8 +13,6 @@ var _fs = _interopRequireDefault(require("fs"));
6+
7+
var _path = _interopRequireDefault(require("path"));
8+
9+
-var _url = _interopRequireDefault(require("url"));
10+
-
11+
var _utils = require("./utils");
12+
13+
var PLUGIN_NAME = 'ReactLoadableSSRAddon';
14+
@@ -219,10 +217,19 @@ var ReactLoadableSSRAddon = function () {
15+
currentAsset[_this2.options.integrityPropertyName] = (0, _utils.computeIntegrity)(_this2.options.integrityAlgorithms, currentAsset.source());
16+
}
17+
18+
+ // Simple concatenation avoids the deprecated url.resolve() API.
19+
+ // Ensure publicPath has a trailing separator before appending the file.
20+
+ var base = _this2.options.publicPath || '';
21+
+ if (base && !base.endsWith('/')) {
22+
+ base += '/';
23+
+ }
24+
+
25+
+ const publicPath = base + file;
26+
+
27+
assets[id][ext].push({
28+
file: file,
29+
hash: hash,
30+
- publicPath: _url["default"].resolve(_this2.options.publicPath || '', file),
31+
+ publicPath,
32+
integrity: currentAsset[_this2.options.integrityPropertyName]
33+
});
34+
}
35+
diff --git a/package-lock.json b/package-lock.json
36+
deleted file mode 100644
37+
index bfe36bbbe7fb95b07f43e099a45edc88acf15592..0000000000000000000000000000000000000000

0 commit comments

Comments
 (0)