@rspack/test-tools 2.0.2 → 2.0.3
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/case/builtin.js +106 -66
- package/dist/case/cache.js +136 -122
- package/dist/case/common.d.ts +4 -4
- package/dist/case/common.js +162 -157
- package/dist/case/compiler.d.ts +4 -4
- package/dist/case/compiler.js +75 -64
- package/dist/case/config.js +112 -74
- package/dist/case/defaults.js +136 -83
- package/dist/case/diagnostic.js +112 -84
- package/dist/case/error.d.ts +4 -4
- package/dist/case/error.js +105 -89
- package/dist/case/esm-output.js +118 -87
- package/dist/case/example.js +73 -35
- package/dist/case/hash.js +74 -59
- package/dist/case/hook.js +151 -138
- package/dist/case/hot-step.js +130 -161
- package/dist/case/hot.js +148 -134
- package/dist/case/incremental.js +91 -58
- package/dist/case/index.js +134 -51
- package/dist/case/multi-compiler.d.ts +4 -4
- package/dist/case/multi-compiler.js +81 -56
- package/dist/case/native-watcher.js +62 -30
- package/dist/case/normal.js +253 -185
- package/dist/case/runner.js +80 -51
- package/dist/case/serial.js +47 -16
- package/dist/case/stats-api.d.ts +4 -4
- package/dist/case/stats-api.js +63 -43
- package/dist/case/stats-output.d.ts +3 -3
- package/dist/case/stats-output.js +147 -152
- package/dist/case/treeshaking.js +66 -35
- package/dist/case/watch.d.ts +3 -19
- package/dist/case/watch.js +204 -224
- package/dist/compiler.js +222 -195
- package/dist/helper/directory.js +83 -71
- package/dist/helper/disable-iconv-lite-warning.js +35 -9
- package/dist/helper/expect/diff.js +39 -10
- package/dist/helper/expect/error.js +62 -30
- package/dist/helper/expect/placeholder.js +47 -21
- package/dist/helper/expect/rspack.js +35 -13
- package/dist/helper/expect/to-be-typeof.js +39 -7
- package/dist/helper/expect/to-end-with.js +40 -8
- package/dist/helper/expect/to-match-file-snapshot.js +103 -80
- package/dist/helper/hot-update/index.js +35 -4
- package/dist/helper/hot-update/loader.d.ts +1 -0
- package/dist/helper/hot-update/loader.js +39 -4
- package/dist/helper/hot-update/plugin.d.ts +1 -1
- package/dist/helper/hot-update/plugin.js +87 -74
- package/dist/helper/index.js +138 -24
- package/dist/helper/is.js +51 -10
- package/dist/helper/legacy/EventSourceForNode.d.ts +11 -3
- package/dist/helper/legacy/EventSourceForNode.js +83 -37
- package/dist/helper/legacy/LogTestPlugin.d.ts +2 -3
- package/dist/helper/legacy/LogTestPlugin.js +39 -6
- package/dist/helper/legacy/asModule.d.ts +3 -3
- package/dist/helper/legacy/asModule.js +68 -19
- package/dist/helper/legacy/captureStdio.d.ts +1 -2
- package/dist/helper/legacy/captureStdio.js +69 -29
- package/dist/helper/legacy/checkArrayExpectation.d.ts +1 -2
- package/dist/helper/legacy/checkArrayExpectation.js +132 -121
- package/dist/helper/legacy/copyDiff.d.ts +1 -2
- package/dist/helper/legacy/copyDiff.js +86 -42
- package/dist/helper/legacy/createFakeWorker.d.ts +2 -3
- package/dist/helper/legacy/createFakeWorker.js +90 -47
- package/dist/helper/legacy/createLazyTestEnv.d.ts +2 -3
- package/dist/helper/legacy/createLazyTestEnv.js +70 -59
- package/dist/helper/legacy/currentScript.d.ts +2 -2
- package/dist/helper/legacy/currentScript.js +35 -2
- package/dist/helper/legacy/deprecationTracking.d.ts +1 -1
- package/dist/helper/legacy/deprecationTracking.js +53 -28
- package/dist/helper/legacy/expectSource.d.ts +3 -2
- package/dist/helper/legacy/expectSource.js +42 -18
- package/dist/helper/legacy/fakeSystem.d.ts +12 -9
- package/dist/helper/legacy/fakeSystem.js +68 -58
- package/dist/helper/legacy/findOutputFiles.d.ts +7 -2
- package/dist/helper/legacy/findOutputFiles.js +60 -13
- package/dist/helper/legacy/parseResource.d.ts +1 -1
- package/dist/helper/legacy/parseResource.js +36 -6
- package/dist/helper/legacy/regexEscape.d.ts +1 -2
- package/dist/helper/legacy/regexEscape.js +39 -5
- package/dist/helper/legacy/supportDefaultAssignment.d.ts +1 -2
- package/dist/helper/legacy/supportDefaultAssignment.js +40 -7
- package/dist/helper/legacy/supportsTextDecoder.d.ts +1 -2
- package/dist/helper/legacy/supportsTextDecoder.js +40 -6
- package/dist/helper/legacy/supportsUsing.d.ts +1 -2
- package/dist/helper/legacy/supportsUsing.js +40 -7
- package/dist/helper/legacy/urlToRelativePath.d.ts +2 -2
- package/dist/helper/legacy/urlToRelativePath.js +56 -7
- package/dist/helper/parse-modules.js +52 -42
- package/dist/helper/read-config-file.js +60 -18
- package/dist/helper/serializers.js +62 -33
- package/dist/helper/setup-env.js +81 -91
- package/dist/helper/setup-expect.js +13 -13
- package/dist/helper/setup-wasm.js +18 -9
- package/dist/helper/stringify-config.js +44 -26
- package/dist/helper/update-snapshot.js +35 -3
- package/dist/helper/util/checkSourceMap.js +119 -80
- package/dist/helper/util/checkStats.d.ts +1 -1
- package/dist/helper/util/checkStats.js +42 -17
- package/dist/helper/util/expectWarningFactory.d.ts +1 -2
- package/dist/helper/util/expectWarningFactory.js +41 -8
- package/dist/helper/util/filterUtil.d.ts +9 -8
- package/dist/helper/util/filterUtil.js +63 -23
- package/dist/helper/win.js +46 -7
- package/dist/index.js +115 -23
- package/dist/plugin/index.js +55 -14
- package/dist/plugin/lazy-compilation-test-plugin.js +55 -41
- package/dist/reporter/index.js +55 -14
- package/dist/reporter/streamed-events-reporter.js +51 -77
- package/dist/runner/index.js +62 -15
- package/dist/runner/node/index.js +365 -431
- package/dist/runner/web/index.js +278 -263
- package/dist/test/context.js +67 -41
- package/dist/test/creator.js +135 -167
- package/dist/test/debug.js +89 -58
- package/dist/test/tester.js +94 -74
- package/dist/type.d.ts +10 -9
- package/dist/type.js +43 -9
- package/package.json +21 -20
package/dist/case/hook.js
CHANGED
|
@@ -1,199 +1,205 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
HookCasesContext: ()=>HookCasesContext,
|
|
37
|
+
createHookCase: ()=>createHookCase
|
|
38
|
+
});
|
|
39
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
40
|
+
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
41
|
+
const core_namespaceObject = require("@rspack/core");
|
|
42
|
+
const external_jest_snapshot_namespaceObject = require("jest-snapshot");
|
|
43
|
+
const external_path_serializer_namespaceObject = require("path-serializer");
|
|
44
|
+
const external_pretty_format_namespaceObject = require("pretty-format");
|
|
45
|
+
const external_rspack_merge_namespaceObject = require("rspack-merge");
|
|
46
|
+
var external_rspack_merge_default = /*#__PURE__*/ __webpack_require__.n(external_rspack_merge_namespaceObject);
|
|
47
|
+
const context_js_namespaceObject = require("../test/context.js");
|
|
48
|
+
const creator_js_namespaceObject = require("../test/creator.js");
|
|
49
|
+
const external_common_js_namespaceObject = require("./common.js");
|
|
17
50
|
const srcDir = __TEST_FIXTURES_PATH__;
|
|
18
|
-
const distDir =
|
|
19
|
-
const creator = new
|
|
51
|
+
const distDir = external_node_path_default().resolve(__TEST_DIST_PATH__, 'hook');
|
|
52
|
+
const creator = new creator_js_namespaceObject.BasicCaseCreator({
|
|
20
53
|
clean: true,
|
|
21
54
|
describe: true,
|
|
22
|
-
createContext: (config)
|
|
23
|
-
steps: ({ name, caseConfig: _caseConfig, src })
|
|
55
|
+
createContext: (config)=>new HookCasesContext(config.src, config.name, config),
|
|
56
|
+
steps: ({ name, caseConfig: _caseConfig, src })=>{
|
|
24
57
|
const caseConfig = _caseConfig;
|
|
25
58
|
return [
|
|
26
59
|
{
|
|
27
|
-
config: async (context)
|
|
60
|
+
config: async (context)=>{
|
|
28
61
|
const compiler = context.getCompiler();
|
|
29
|
-
const options = await (0,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
62
|
+
const options = await (0, external_common_js_namespaceObject.config)(context, name, [
|
|
63
|
+
'rspack.config.js',
|
|
64
|
+
'webpack.config.js'
|
|
65
|
+
], hook_defaultOptions(context, caseConfig.options));
|
|
66
|
+
if (!global.printLogger) options.infrastructureLogging = {
|
|
67
|
+
level: 'error'
|
|
68
|
+
};
|
|
35
69
|
compiler.setOptions(options);
|
|
36
70
|
},
|
|
37
|
-
compiler: async (context)
|
|
38
|
-
const c = await (0,
|
|
39
|
-
if (caseConfig.compiler)
|
|
40
|
-
await caseConfig.compiler(context, c);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
build: async (context) => {
|
|
44
|
-
await (0, common_1.build)(context, name);
|
|
71
|
+
compiler: async (context)=>{
|
|
72
|
+
const c = await (0, external_common_js_namespaceObject.compiler)(context, name);
|
|
73
|
+
if (caseConfig.compiler) await caseConfig.compiler(context, c);
|
|
45
74
|
},
|
|
46
|
-
|
|
47
|
-
|
|
75
|
+
build: async (context)=>{
|
|
76
|
+
await (0, external_common_js_namespaceObject.build)(context, name);
|
|
48
77
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
78
|
+
run: async (env, context)=>{},
|
|
79
|
+
check: async (env, context)=>{
|
|
80
|
+
await (0, external_common_js_namespaceObject.checkSnapshot)(env, context, name, external_node_path_default().join(src, 'output.snap.txt'), caseConfig.snapshotFileFilter);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
53
83
|
];
|
|
54
|
-
}
|
|
84
|
+
}
|
|
55
85
|
});
|
|
56
86
|
function createHookCase(name, src, dist, source) {
|
|
57
|
-
const caseConfig = require(
|
|
58
|
-
const testName =
|
|
59
|
-
creator.create(name, src, dist,
|
|
87
|
+
const caseConfig = require(external_node_path_default().join(src, 'test.js'));
|
|
88
|
+
const testName = external_node_path_default().basename(name.slice(0, name.indexOf(external_node_path_default().extname(name))));
|
|
89
|
+
creator.create(name, src, dist, void 0, {
|
|
60
90
|
caseConfig,
|
|
61
|
-
description: ()
|
|
62
|
-
createContext: (config)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
91
|
+
description: ()=>caseConfig.description,
|
|
92
|
+
createContext: (config)=>new HookCasesContext(src, testName, {
|
|
93
|
+
src: source,
|
|
94
|
+
dist: dist,
|
|
95
|
+
name: name
|
|
96
|
+
})
|
|
67
97
|
});
|
|
68
98
|
}
|
|
69
99
|
const sourceSerializer = {
|
|
70
|
-
test(val) {
|
|
71
|
-
return val instanceof
|
|
100
|
+
test (val) {
|
|
101
|
+
return val instanceof core_namespaceObject.sources.Source;
|
|
72
102
|
},
|
|
73
|
-
print(val) {
|
|
103
|
+
print (val) {
|
|
74
104
|
return val.source();
|
|
75
|
-
}
|
|
105
|
+
}
|
|
76
106
|
};
|
|
77
107
|
const internalSerializer = {
|
|
78
|
-
test(val) {
|
|
79
|
-
return val instanceof
|
|
108
|
+
test (val) {
|
|
109
|
+
return val instanceof core_namespaceObject.Compiler || val instanceof core_namespaceObject.Compilation;
|
|
80
110
|
},
|
|
81
|
-
print(val) {
|
|
111
|
+
print (val) {
|
|
82
112
|
return JSON.stringify(`${val.constructor.name}(internal ignored)`);
|
|
83
|
-
}
|
|
113
|
+
}
|
|
84
114
|
};
|
|
85
|
-
const testPathSerializer = (0,
|
|
115
|
+
const testPathSerializer = (0, external_path_serializer_namespaceObject.createSnapshotSerializer)({
|
|
86
116
|
replace: [
|
|
87
117
|
{
|
|
88
118
|
match: srcDir,
|
|
89
|
-
mark: '<HOOK_SRC_DIR>'
|
|
119
|
+
mark: '<HOOK_SRC_DIR>'
|
|
90
120
|
},
|
|
91
121
|
{
|
|
92
122
|
match: distDir,
|
|
93
|
-
mark: '<HOOK_DIST_DIR>'
|
|
94
|
-
}
|
|
95
|
-
]
|
|
123
|
+
mark: '<HOOK_DIST_DIR>'
|
|
124
|
+
}
|
|
125
|
+
]
|
|
96
126
|
});
|
|
97
127
|
const escapeRegex = true;
|
|
98
128
|
const printFunctionName = false;
|
|
99
|
-
const normalizeNewlines = (str)
|
|
100
|
-
const serialize = (val, indent = 2, formatOverrides = {})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}));
|
|
112
|
-
class HookCasesContext extends
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.
|
|
129
|
+
const normalizeNewlines = (str)=>str.replace(/\r\n|\r/g, '\n');
|
|
130
|
+
const serialize = (val, indent = 2, formatOverrides = {})=>normalizeNewlines((0, external_pretty_format_namespaceObject.format)(val, {
|
|
131
|
+
escapeRegex,
|
|
132
|
+
indent,
|
|
133
|
+
plugins: [
|
|
134
|
+
...(0, external_jest_snapshot_namespaceObject.getSerializers)(),
|
|
135
|
+
sourceSerializer,
|
|
136
|
+
internalSerializer,
|
|
137
|
+
testPathSerializer
|
|
138
|
+
],
|
|
139
|
+
printFunctionName,
|
|
140
|
+
...formatOverrides
|
|
141
|
+
}));
|
|
142
|
+
class HookCasesContext extends context_js_namespaceObject.TestContext {
|
|
143
|
+
src;
|
|
144
|
+
testName;
|
|
145
|
+
options;
|
|
146
|
+
promises = [];
|
|
147
|
+
count = 0;
|
|
148
|
+
snapshots = {};
|
|
149
|
+
snapshotsList = [];
|
|
150
|
+
constructor(src, testName, options){
|
|
151
|
+
super(options), this.src = src, this.testName = testName, this.options = options;
|
|
122
152
|
this.snapped = this.snapped.bind(this);
|
|
123
153
|
}
|
|
124
|
-
/**
|
|
125
|
-
* Snapshot function arguments and return value.
|
|
126
|
-
* Generated snapshot is located in the same directory with the test source.
|
|
127
|
-
* @example
|
|
128
|
-
* compiler.hooks.compilation("name", context.snapped((...args) => { ... }))
|
|
129
|
-
*/
|
|
130
154
|
snapped(cb, prefix = '') {
|
|
131
|
-
// eslint-disable-next-line
|
|
132
155
|
const context = this;
|
|
133
|
-
return function
|
|
156
|
+
return function(...args) {
|
|
134
157
|
const group = prefix ? prefix : context.count++;
|
|
135
158
|
context._addSnapshot(args, 'input', group);
|
|
136
159
|
const output = cb.apply(this, args);
|
|
137
|
-
if (output && typeof output.then
|
|
160
|
+
if (output && 'function' == typeof output.then) {
|
|
138
161
|
let resolve;
|
|
139
|
-
context.promises.push(new Promise((r)
|
|
140
|
-
return output
|
|
141
|
-
.then((o) => {
|
|
162
|
+
context.promises.push(new Promise((r)=>resolve = r));
|
|
163
|
+
return output.then((o)=>{
|
|
142
164
|
context._addSnapshot(o, 'output (Promise resolved)', group);
|
|
143
165
|
return o;
|
|
144
|
-
})
|
|
145
|
-
.catch((o) => {
|
|
166
|
+
}).catch((o)=>{
|
|
146
167
|
context._addSnapshot(o, 'output (Promise rejected)', group);
|
|
147
168
|
return o;
|
|
148
|
-
})
|
|
149
|
-
.finally(resolve);
|
|
169
|
+
}).finally(resolve);
|
|
150
170
|
}
|
|
151
171
|
context._addSnapshot(output, 'output', group);
|
|
152
172
|
return output;
|
|
153
173
|
};
|
|
154
174
|
}
|
|
155
|
-
/**
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
158
175
|
_addSnapshot(content, name, group) {
|
|
159
|
-
const normalizedContent = Buffer.isBuffer(content)
|
|
160
|
-
|
|
161
|
-
:
|
|
162
|
-
|
|
163
|
-
printBasicPrototype: true,
|
|
164
|
-
}).replace(/\r\n/g, '\n');
|
|
176
|
+
const normalizedContent = Buffer.isBuffer(content) ? content : serialize(content, void 0, {
|
|
177
|
+
escapeString: true,
|
|
178
|
+
printBasicPrototype: true
|
|
179
|
+
}).replace(/\r\n/g, '\n');
|
|
165
180
|
(this.snapshots[group] = this.snapshots[group] || []).push([
|
|
166
181
|
normalizedContent,
|
|
167
|
-
name
|
|
182
|
+
name
|
|
168
183
|
]);
|
|
169
|
-
if (!this.snapshotsList.includes(group))
|
|
170
|
-
this.snapshotsList.push(group);
|
|
171
|
-
}
|
|
184
|
+
if (!this.snapshotsList.includes(group)) this.snapshotsList.push(group);
|
|
172
185
|
}
|
|
173
|
-
/**
|
|
174
|
-
* @internal
|
|
175
|
-
*/
|
|
176
186
|
async collectSnapshots(env, options = {
|
|
177
|
-
diff: {}
|
|
187
|
+
diff: {}
|
|
178
188
|
}) {
|
|
179
189
|
await Promise.allSettled(this.promises);
|
|
180
|
-
if (!this.snapshotsList.length)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const block = this.snapshots[group || index].reduce((acc, [content, name]) => {
|
|
190
|
+
if (!this.snapshotsList.length) return;
|
|
191
|
+
const snapshots = this.snapshotsList.reduce((acc, group, index)=>{
|
|
192
|
+
const block = this.snapshots[group || index].reduce((acc, [content, name])=>{
|
|
184
193
|
name = `## ${name || `test: ${index}`}\n\n`;
|
|
185
194
|
const block = `\`\`\`javascript\n${content}\n\`\`\`\n`;
|
|
186
195
|
return `${acc}${name + block}\n`;
|
|
187
196
|
}, '');
|
|
188
197
|
return `${acc}# ${Number.isInteger(group) ? `Group: ${index}` : group}\n\n${block}`;
|
|
189
198
|
}, '');
|
|
190
|
-
env
|
|
191
|
-
.expect(snapshots)
|
|
192
|
-
.toMatchFileSnapshotSync(node_path_1.default.join(this.src, 'hooks.snap.txt'), options);
|
|
199
|
+
env.expect(snapshots).toMatchFileSnapshotSync(external_node_path_default().join(this.src, 'hooks.snap.txt'), options);
|
|
193
200
|
}
|
|
194
201
|
}
|
|
195
|
-
|
|
196
|
-
function defaultOptions(context, custom) {
|
|
202
|
+
function hook_defaultOptions(context, custom) {
|
|
197
203
|
let defaultOptions = {
|
|
198
204
|
context: context.getSource(),
|
|
199
205
|
mode: 'production',
|
|
@@ -204,24 +210,31 @@ function defaultOptions(context, custom) {
|
|
|
204
210
|
output: {
|
|
205
211
|
path: context.getDist(),
|
|
206
212
|
bundlerInfo: {
|
|
207
|
-
force: false
|
|
208
|
-
}
|
|
213
|
+
force: false
|
|
214
|
+
}
|
|
209
215
|
},
|
|
210
216
|
module: {
|
|
211
217
|
defaultRules: [
|
|
212
218
|
'...',
|
|
213
219
|
{
|
|
214
220
|
test: /\.css$/i,
|
|
215
|
-
type: 'css/auto'
|
|
216
|
-
}
|
|
217
|
-
]
|
|
221
|
+
type: 'css/auto'
|
|
222
|
+
}
|
|
223
|
+
]
|
|
218
224
|
},
|
|
219
225
|
optimization: {
|
|
220
|
-
minimize: false
|
|
221
|
-
}
|
|
226
|
+
minimize: false
|
|
227
|
+
}
|
|
222
228
|
};
|
|
223
|
-
if (custom)
|
|
224
|
-
defaultOptions = (0, rspack_merge_1.default)(defaultOptions, custom(context));
|
|
225
|
-
}
|
|
229
|
+
if (custom) defaultOptions = external_rspack_merge_default()(defaultOptions, custom(context));
|
|
226
230
|
return defaultOptions;
|
|
227
231
|
}
|
|
232
|
+
exports.HookCasesContext = __webpack_exports__.HookCasesContext;
|
|
233
|
+
exports.createHookCase = __webpack_exports__.createHookCase;
|
|
234
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
235
|
+
"HookCasesContext",
|
|
236
|
+
"createHookCase"
|
|
237
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
238
|
+
Object.defineProperty(exports, '__esModule', {
|
|
239
|
+
value: true
|
|
240
|
+
});
|