@shuvi/platform-web 1.0.30 → 1.0.32
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/lib/node/index.js
CHANGED
|
@@ -22,13 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
const node_1 = require("@shuvi/platform-shared/node");
|
|
30
|
-
const trace_1 = __importDefault(require("./trace"));
|
|
31
|
-
const external_internal_libs_1 = __importDefault(require("./external-internal-libs"));
|
|
32
27
|
const features_1 = require("./features");
|
|
33
28
|
const paths_1 = require("./paths");
|
|
34
29
|
__exportStar(require("../shared"), exports);
|
|
@@ -43,8 +38,6 @@ const platform = ({ framework = 'react' } = {}) => (platformContext) => __awaite
|
|
|
43
38
|
(0, paths_1.resolvePkgFile)('shuvi-image.d.ts')
|
|
44
39
|
],
|
|
45
40
|
plugins: [
|
|
46
|
-
external_internal_libs_1.default,
|
|
47
|
-
trace_1.default,
|
|
48
41
|
...node_1.SharedPlugins,
|
|
49
42
|
...(0, features_1.getPlugins)(platformContext),
|
|
50
43
|
...platformFrameworkContent.plugins
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/platform-web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@next/react-refresh-utils": "12.1.6",
|
|
75
|
-
"@shuvi/error-overlay": "1.0.
|
|
76
|
-
"@shuvi/hook": "1.0.
|
|
77
|
-
"@shuvi/platform-shared": "1.0.
|
|
78
|
-
"@shuvi/router": "1.0.
|
|
79
|
-
"@shuvi/router-react": "1.0.
|
|
80
|
-
"@shuvi/runtime": "1.0.
|
|
81
|
-
"@shuvi/shared": "1.0.
|
|
82
|
-
"@shuvi/toolpack": "1.0.
|
|
83
|
-
"@shuvi/utils": "1.0.
|
|
75
|
+
"@shuvi/error-overlay": "1.0.32",
|
|
76
|
+
"@shuvi/hook": "1.0.32",
|
|
77
|
+
"@shuvi/platform-shared": "1.0.32",
|
|
78
|
+
"@shuvi/router": "1.0.32",
|
|
79
|
+
"@shuvi/router-react": "1.0.32",
|
|
80
|
+
"@shuvi/runtime": "1.0.32",
|
|
81
|
+
"@shuvi/shared": "1.0.32",
|
|
82
|
+
"@shuvi/toolpack": "1.0.32",
|
|
83
|
+
"@shuvi/utils": "1.0.32",
|
|
84
84
|
"content-type": "1.0.4",
|
|
85
85
|
"core-js": "3.6.5",
|
|
86
86
|
"doura": "0.0.11",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"whatwg-fetch": "3.0.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@shuvi/service": "1.0.
|
|
101
|
+
"@shuvi/service": "1.0.32"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@shuvi/service": "workspace:*",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const service_1 = require("@shuvi/service");
|
|
4
|
-
const shared_1 = require("../shared");
|
|
5
|
-
const paths_1 = require("./paths");
|
|
6
|
-
const configWebpack = (config, { name, helpers }) => {
|
|
7
|
-
if (name === shared_1.BUNDLER_TARGET_SERVER) {
|
|
8
|
-
helpers.addExternals(config, ({ request }, next) => {
|
|
9
|
-
if (/@shuvi[/\\](hook$|router$|utils)/.test(request)) {
|
|
10
|
-
return next(null, (0, paths_1.resolveDep)(request));
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return next(null, 'next');
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return config;
|
|
18
|
-
};
|
|
19
|
-
exports.default = {
|
|
20
|
-
core: (0, service_1.createPlugin)({
|
|
21
|
-
configWebpack
|
|
22
|
-
})
|
|
23
|
-
};
|
package/lib/node/trace.d.ts
DELETED
package/lib/node/trace.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const service_1 = require("@shuvi/service");
|
|
4
|
-
const shared_1 = require("../shared");
|
|
5
|
-
const paths_1 = require("./paths");
|
|
6
|
-
const configWebpack = (config, { name, helpers }) => {
|
|
7
|
-
if (name === shared_1.BUNDLER_TARGET_SERVER) {
|
|
8
|
-
const tracePath = (0, paths_1.resolveLocal)('@shuvi/service', 'lib/trace');
|
|
9
|
-
helpers.addExternals(config, ({ request }, next) => {
|
|
10
|
-
switch (request) {
|
|
11
|
-
// trace is a singleton, so we don't want to bundle it
|
|
12
|
-
case '@shuvi/service/lib/trace': {
|
|
13
|
-
next(null, `commonjs ${tracePath}`);
|
|
14
|
-
break;
|
|
15
|
-
}
|
|
16
|
-
default: {
|
|
17
|
-
next(null, 'next');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return config;
|
|
23
|
-
};
|
|
24
|
-
exports.default = {
|
|
25
|
-
core: (0, service_1.createPlugin)({
|
|
26
|
-
configWebpack
|
|
27
|
-
})
|
|
28
|
-
};
|