@dr.pogodin/react-utils 1.41.13 → 1.41.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/development/shared/utils/webpack.js +7 -1
- package/build/development/shared/utils/webpack.js.map +1 -1
- package/build/development/web.bundle.js +19 -114
- package/build/production/shared/utils/webpack.js +6 -1
- package/build/production/shared/utils/webpack.js.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/config/webpack/lib-base.js +2 -2
- package/package.json +1 -1
- package/src/shared/utils/webpack.ts +6 -1
|
@@ -27,8 +27,9 @@ function configFactory(ops) {
|
|
|
27
27
|
entry: ops.entry,
|
|
28
28
|
externals: [
|
|
29
29
|
/@babel\/runtime/,
|
|
30
|
-
'@dr.pogodin/react-global-state',
|
|
31
30
|
'@dr.pogodin/js-utils',
|
|
31
|
+
'@dr.pogodin/react-global-state',
|
|
32
|
+
'@dr.pogodin/react-helmet',
|
|
32
33
|
'@dr.pogodin/react-themes',
|
|
33
34
|
'@dr.pogodin/react-utils',
|
|
34
35
|
'axios',
|
|
@@ -39,7 +40,6 @@ function configFactory(ops) {
|
|
|
39
40
|
'qs',
|
|
40
41
|
'react',
|
|
41
42
|
/react-dom/,
|
|
42
|
-
'react-helmet-async',
|
|
43
43
|
'react-router',
|
|
44
44
|
'uuid',
|
|
45
45
|
],
|
package/package.json
CHANGED
|
@@ -13,6 +13,11 @@ export function requireWeak<Module extends NodeJS.Module>(
|
|
|
13
13
|
): Module | null {
|
|
14
14
|
if (IS_CLIENT_SIDE) return null;
|
|
15
15
|
|
|
16
|
+
// TODO: On one hand, this try/catch wrap silencing errors is bad, as it may
|
|
17
|
+
// hide legit errors, in a way difficult to notice and understand; but on the
|
|
18
|
+
// other hand it fails for some (unclear, but legit?) reasons in some environments,
|
|
19
|
+
// like during the static code generation for docs. Perhaps, something should
|
|
20
|
+
// be implemented differently here.
|
|
16
21
|
try {
|
|
17
22
|
/* eslint-disable no-eval */
|
|
18
23
|
const { resolve } = eval('require')('path');
|
|
@@ -20,7 +25,7 @@ export function requireWeak<Module extends NodeJS.Module>(
|
|
|
20
25
|
const module = eval('require')(path) as Module;
|
|
21
26
|
/* eslint-enable no-eval */
|
|
22
27
|
|
|
23
|
-
if (!('default' in module)) return module;
|
|
28
|
+
if (!('default' in module) || !module.default) return module;
|
|
24
29
|
|
|
25
30
|
const { default: def, ...named } = module;
|
|
26
31
|
|