xhs-mp-pack 1.1.4-beta.0 → 1.1.4
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/dist/MPPackSetting.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare class MPPackSetting {
|
|
|
32
32
|
enableVDom?: boolean | undefined;
|
|
33
33
|
enableV2?: boolean | undefined;
|
|
34
34
|
enableV1?: boolean | undefined;
|
|
35
|
-
action: "
|
|
35
|
+
action: "dev" | "build";
|
|
36
36
|
watch?: boolean | undefined;
|
|
37
37
|
enableSourcemap?: boolean | undefined;
|
|
38
38
|
compilePkgs?: string[] | undefined;
|
package/dist/PluginManager.js
CHANGED
|
@@ -39,9 +39,6 @@ const cleverMerge_1 = require("@/base/cleverMerge");
|
|
|
39
39
|
const lazyModuleFactoryPlugin_1 = __importDefault(require("./module/lazy/lazyModuleFactoryPlugin"));
|
|
40
40
|
// runtime
|
|
41
41
|
const APIPlugin_1 = __importDefault(require("./plugins/APIPlugin"));
|
|
42
|
-
// import WebpackIsIncludedPlugin from './WebpackIsIncludedPlugin'
|
|
43
|
-
// uri
|
|
44
|
-
const ResolverCachePlugin_1 = __importDefault(require("./cache/ResolverCachePlugin"));
|
|
45
42
|
// dependencies
|
|
46
43
|
const DynamicEntryPlugin_1 = __importDefault(require("./dependencies/entry/DynamicEntryPlugin"));
|
|
47
44
|
// output library
|
|
@@ -78,8 +75,8 @@ const AddManagedPathsPlugin_1 = __importDefault(require("./cache/AddManagedPaths
|
|
|
78
75
|
const MemoryWithGcCachePlugin_1 = __importDefault(require("./cache/MemoryWithGcCachePlugin"));
|
|
79
76
|
const MemoryCachePlugin_1 = __importDefault(require("./cache/MemoryCachePlugin"));
|
|
80
77
|
const AddBuildDependenciesPlugin_1 = __importDefault(require("./cache/AddBuildDependenciesPlugin"));
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
// import IdleFileCachePlugin from './cache/IdleFileCachePlugin'
|
|
79
|
+
// import PackFileCacheStrategy from './cache/PackFileCacheStrategy'
|
|
83
80
|
const NodeStuffPlugin_1 = __importDefault(require("./plugins/NodeStuffPlugin"));
|
|
84
81
|
// stat
|
|
85
82
|
class PluginManager {
|
|
@@ -251,21 +248,26 @@ class PluginManager {
|
|
|
251
248
|
maxGenerations: cacheOptions.maxMemoryGenerations,
|
|
252
249
|
}).apply(compiler);
|
|
253
250
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
251
|
+
// new IdleFileCachePlugin(
|
|
252
|
+
// new PackFileCacheStrategy({
|
|
253
|
+
// compiler,
|
|
254
|
+
// fs: compiler.intermediateFileSystem,
|
|
255
|
+
// context: options.context,
|
|
256
|
+
// cacheLocation: cacheOptions.cacheLocation,
|
|
257
|
+
// version: cacheOptions.version,
|
|
258
|
+
// logger: compiler.getInfrastructureLogger('webpack.cache.PackFileCacheStrategy'),
|
|
259
|
+
// snapshot: options.snapshot,
|
|
260
|
+
// maxAge: cacheOptions.maxAge,
|
|
261
|
+
// profile: cacheOptions.profile,
|
|
262
|
+
// allowCollectingMemory: cacheOptions.allowCollectingMemory,
|
|
263
|
+
// compression: cacheOptions.compression,
|
|
264
|
+
// readonly: cacheOptions.readonly,
|
|
265
|
+
// }),
|
|
266
|
+
// cacheOptions.idleTimeout,
|
|
267
|
+
// cacheOptions.idleTimeoutForInitialStore,
|
|
268
|
+
// cacheOptions.idleTimeoutAfterLargeChanges,
|
|
269
|
+
// ).apply(compiler)
|
|
270
|
+
// new ResolverCachePlugin().apply(compiler)
|
|
269
271
|
}
|
|
270
272
|
}
|
|
271
273
|
setupSourceMapPlugins(compiler, options) {
|
|
@@ -34,7 +34,7 @@ class EnableLibraryPlugin {
|
|
|
34
34
|
enabled.add(type);
|
|
35
35
|
if (typeof type === 'string') {
|
|
36
36
|
const enableExportProperty = () => {
|
|
37
|
-
const ExportPropertyTemplatePlugin = require("./ExportPropertyLibraryPlugin");
|
|
37
|
+
const ExportPropertyTemplatePlugin = require("./ExportPropertyLibraryPlugin").default;
|
|
38
38
|
new ExportPropertyTemplatePlugin({
|
|
39
39
|
type,
|
|
40
40
|
nsObjectUsed: type !== 'module',
|
|
@@ -42,7 +42,7 @@ class EnableLibraryPlugin {
|
|
|
42
42
|
};
|
|
43
43
|
switch (type) {
|
|
44
44
|
case 'var': {
|
|
45
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
45
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
46
46
|
new AssignLibraryPlugin({
|
|
47
47
|
type,
|
|
48
48
|
prefix: [],
|
|
@@ -52,7 +52,7 @@ class EnableLibraryPlugin {
|
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
54
|
case 'assign-properties': {
|
|
55
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
55
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
56
56
|
new AssignLibraryPlugin({
|
|
57
57
|
type,
|
|
58
58
|
prefix: [],
|
|
@@ -63,7 +63,7 @@ class EnableLibraryPlugin {
|
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
65
|
case 'assign': {
|
|
66
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
66
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
67
67
|
new AssignLibraryPlugin({
|
|
68
68
|
type,
|
|
69
69
|
prefix: [],
|
|
@@ -73,7 +73,7 @@ class EnableLibraryPlugin {
|
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
case 'this': {
|
|
76
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
76
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
77
77
|
new AssignLibraryPlugin({
|
|
78
78
|
type,
|
|
79
79
|
prefix: ['this'],
|
|
@@ -83,7 +83,7 @@ class EnableLibraryPlugin {
|
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
85
|
case 'window': {
|
|
86
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
86
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
87
87
|
new AssignLibraryPlugin({
|
|
88
88
|
type,
|
|
89
89
|
prefix: ['window'],
|
|
@@ -93,7 +93,7 @@ class EnableLibraryPlugin {
|
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
case 'self': {
|
|
96
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
96
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
97
97
|
new AssignLibraryPlugin({
|
|
98
98
|
type,
|
|
99
99
|
prefix: ['self'],
|
|
@@ -103,7 +103,7 @@ class EnableLibraryPlugin {
|
|
|
103
103
|
break;
|
|
104
104
|
}
|
|
105
105
|
case 'global': {
|
|
106
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
106
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
107
107
|
new AssignLibraryPlugin({
|
|
108
108
|
type,
|
|
109
109
|
prefix: 'global',
|
|
@@ -113,7 +113,7 @@ class EnableLibraryPlugin {
|
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
case 'commonjs': {
|
|
116
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
116
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
117
117
|
new AssignLibraryPlugin({
|
|
118
118
|
type,
|
|
119
119
|
prefix: ['exports'],
|
|
@@ -123,7 +123,7 @@ class EnableLibraryPlugin {
|
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
125
|
case 'commonjs-static': {
|
|
126
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
126
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
127
127
|
new AssignLibraryPlugin({
|
|
128
128
|
type,
|
|
129
129
|
prefix: ['exports'],
|
|
@@ -134,7 +134,7 @@ class EnableLibraryPlugin {
|
|
|
134
134
|
}
|
|
135
135
|
case 'commonjs2':
|
|
136
136
|
case 'commonjs-module': {
|
|
137
|
-
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
|
137
|
+
const AssignLibraryPlugin = require("./AssignLibraryPlugin").default;
|
|
138
138
|
new AssignLibraryPlugin({
|
|
139
139
|
type,
|
|
140
140
|
prefix: ['module', 'exports'],
|
|
@@ -146,7 +146,7 @@ class EnableLibraryPlugin {
|
|
|
146
146
|
case 'umd':
|
|
147
147
|
case 'umd2': {
|
|
148
148
|
enableExportProperty();
|
|
149
|
-
const UmdLibraryPlugin = require("./UmdLibraryPlugin");
|
|
149
|
+
const UmdLibraryPlugin = require("./UmdLibraryPlugin").default;
|
|
150
150
|
new UmdLibraryPlugin({
|
|
151
151
|
type,
|
|
152
152
|
optionalAmdExternalAsGlobal: type === 'umd2',
|
|
@@ -154,7 +154,7 @@ class EnableLibraryPlugin {
|
|
|
154
154
|
break;
|
|
155
155
|
}
|
|
156
156
|
case 'jsonp': {
|
|
157
|
-
const JsonpLibraryPlugin = require("./JsonpLibraryPlugin");
|
|
157
|
+
const JsonpLibraryPlugin = require("./JsonpLibraryPlugin").default;
|
|
158
158
|
enableExportProperty();
|
|
159
159
|
new JsonpLibraryPlugin({
|
|
160
160
|
type,
|
|
@@ -163,7 +163,7 @@ class EnableLibraryPlugin {
|
|
|
163
163
|
}
|
|
164
164
|
case 'module': {
|
|
165
165
|
enableExportProperty();
|
|
166
|
-
const ModuleLibraryPlugin = require("./ModuleLibraryPlugin");
|
|
166
|
+
const ModuleLibraryPlugin = require("./ModuleLibraryPlugin").default;
|
|
167
167
|
new ModuleLibraryPlugin({
|
|
168
168
|
type,
|
|
169
169
|
}).apply(compiler);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xhs-mp-pack",
|
|
3
|
-
"version": "1.1.4
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "xhs mp compiler core.",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"category": "esm",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"postcss": "^8.4.31",
|
|
56
56
|
"cssnano": "^6.0.1",
|
|
57
57
|
"webpack-sources": "^3.2.3",
|
|
58
|
-
"xhs-mp-compiler-utils": "1.1.
|
|
59
|
-
"xhs-mp-project": "^1.
|
|
58
|
+
"xhs-mp-compiler-utils": "1.1.3",
|
|
59
|
+
"xhs-mp-project": "^1.1.4"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/babel__generator": "7.6.3",
|