@rsbuild/core 2.0.14 → 2.1.0-beta.0
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/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-chain/types/index.d.ts +30 -7
- package/dist/349.js +10 -0
- package/dist/756.js +87 -58
- package/dist/cssUrlLoader.mjs +3 -7
- package/dist/http-proxy-middleware.js +3 -2
- package/dist/ignoreCssLoader.mjs +7 -1
- package/dist/memfs.js +104 -100
- package/dist/{manifest-plugin.js → rspack-manifest-plugin.js} +6 -6
- package/dist/transformLoader.mjs +6 -9
- package/dist-types/helpers/css.d.ts +3 -0
- package/dist-types/loader/ignoreCssLoader.d.ts +9 -2
- package/dist-types/server/cliShortcuts.d.ts +5 -1
- package/dist-types/server/helper.d.ts +3 -2
- package/dist-types/types/config.d.ts +10 -3
- package/package.json +7 -7
- /package/dist/{sirv.js → build.js} +0 -0
- /package/dist/{ws.js → wrapper.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
755: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(104);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
}
|
|
312
312
|
module.exports = { CachedChildCompilation };
|
|
313
313
|
},
|
|
314
|
-
|
|
314
|
+
104: (module) => {
|
|
315
315
|
"use strict";
|
|
316
316
|
class HtmlWebpackChildCompiler {
|
|
317
317
|
constructor(templates) {
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
}
|
|
481
481
|
module.exports = { HtmlWebpackChildCompiler };
|
|
482
482
|
},
|
|
483
|
-
|
|
483
|
+
128: (module) => {
|
|
484
484
|
"use strict";
|
|
485
485
|
module.exports = {};
|
|
486
486
|
module.exports.none = (chunks) => chunks;
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
};
|
|
500
500
|
module.exports.auto = module.exports.none;
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
775: (module) => {
|
|
503
503
|
"use strict";
|
|
504
504
|
module.exports = function (err) {
|
|
505
505
|
return {
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
};
|
|
524
524
|
};
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
726: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
527
527
|
"use strict";
|
|
528
528
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(159);
|
|
529
529
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
}
|
|
550
550
|
module.exports = { getHtmlRspackPluginHooks };
|
|
551
551
|
},
|
|
552
|
-
|
|
552
|
+
259: (module) => {
|
|
553
553
|
const voidTags = [
|
|
554
554
|
"area",
|
|
555
555
|
"base",
|
|
@@ -617,19 +617,19 @@
|
|
|
617
617
|
htmlTagObjectToString,
|
|
618
618
|
};
|
|
619
619
|
},
|
|
620
|
-
|
|
620
|
+
194: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
621
621
|
"use strict";
|
|
622
622
|
const promisify = __nccwpck_require__(23).promisify;
|
|
623
623
|
const vm = __nccwpck_require__(154);
|
|
624
624
|
const fs = __nccwpck_require__(896);
|
|
625
625
|
const path = __nccwpck_require__(928);
|
|
626
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
626
|
+
const { CachedChildCompilation } = __nccwpck_require__(755);
|
|
627
627
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
628
|
-
__nccwpck_require__(
|
|
629
|
-
const prettyError = __nccwpck_require__(
|
|
630
|
-
const chunkSorter = __nccwpck_require__(
|
|
628
|
+
__nccwpck_require__(259);
|
|
629
|
+
const prettyError = __nccwpck_require__(775);
|
|
630
|
+
const chunkSorter = __nccwpck_require__(128);
|
|
631
631
|
const getHtmlRspackPluginHooks =
|
|
632
|
-
__nccwpck_require__(
|
|
632
|
+
__nccwpck_require__(726).getHtmlRspackPluginHooks;
|
|
633
633
|
const WITH_PLACEHOLDER = "function __with_placeholder__";
|
|
634
634
|
class HtmlRspackPlugin {
|
|
635
635
|
constructor(userOptions = {}) {
|
|
@@ -2398,6 +2398,6 @@
|
|
|
2398
2398
|
}
|
|
2399
2399
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
2400
2400
|
__nccwpck_require__.ab = __dirname + "/";
|
|
2401
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
2401
|
+
var __webpack_exports__ = __nccwpck_require__(194);
|
|
2402
2402
|
module.exports = __webpack_exports__;
|
|
2403
2403
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.1.
|
|
1
|
+
{"name":"http-proxy-middleware","author":"Steven Chim","version":"4.1.1","license":"MIT","types":"index.d.ts","type":"module"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
93: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(879)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
879: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(434);
|
|
13
13
|
function _interopRequireDefault(e) {
|
|
14
14
|
return e && e.__esModule ? e : { default: e };
|
|
15
15
|
}
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
callback(null, result.css, map, { ast });
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
434: (module, exports, __nccwpck_require__) => {
|
|
183
183
|
module = __nccwpck_require__.nmd(module);
|
|
184
184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
185
|
exports.exec = exec;
|
|
@@ -716,6 +716,6 @@
|
|
|
716
716
|
})();
|
|
717
717
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
718
|
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(93);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rspack-chain","version":"2.
|
|
1
|
+
{"name":"rspack-chain","version":"2.1.1","license":"MIT","types":"types/index.d.ts","type":"module"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
|
+
Configuration,
|
|
3
|
+
RuleSetLoaderWithOptions,
|
|
4
|
+
RuleSetRule,
|
|
5
|
+
} from '@rspack/core';
|
|
2
6
|
|
|
3
7
|
// The compiler type of Rspack / webpack are mismatch,
|
|
4
8
|
// so we use a loose type here to allow using webpack plugins.
|
|
@@ -82,12 +86,13 @@ export declare class RspackChain extends __Config.ChainedMap<void> {
|
|
|
82
86
|
bail(value: RspackConfig['bail']): this;
|
|
83
87
|
cache(value: RspackConfig['cache']): this;
|
|
84
88
|
dependencies(value: RspackConfig['dependencies']): this;
|
|
89
|
+
extends(value: RspackConfig['extends']): this;
|
|
85
90
|
ignoreWarnings(value: RspackConfig['ignoreWarnings']): this;
|
|
86
91
|
loader(value: RspackConfig['loader']): this;
|
|
87
92
|
name(value: RspackConfig['name']): this;
|
|
88
93
|
infrastructureLogging(value: RspackConfig['infrastructureLogging']): this;
|
|
89
|
-
snapshot(value: RspackConfig['snapshot']): this;
|
|
90
94
|
lazyCompilation(value: RspackConfig['lazyCompilation']): this;
|
|
95
|
+
incremental(value: RspackConfig['incremental']): this;
|
|
91
96
|
|
|
92
97
|
entry(name: string): RspackChain.EntryPoint;
|
|
93
98
|
plugin(name: string): RspackChain.Plugin<this, PluginInstance>;
|
|
@@ -166,9 +171,11 @@ export declare namespace RspackChain {
|
|
|
166
171
|
type RspackModule = Required<NonNullable<Configuration['module']>>;
|
|
167
172
|
|
|
168
173
|
class Module extends ChainedMap<RspackChain> {
|
|
174
|
+
defaultRules: TypedChainedMap<this, { [key: string]: Rule }>;
|
|
169
175
|
rules: TypedChainedMap<this, { [key: string]: Rule }>;
|
|
170
176
|
generator: ChainedMap<this>;
|
|
171
177
|
parser: ChainedMap<this>;
|
|
178
|
+
defaultRule(name: string): Rule;
|
|
172
179
|
rule(name: string): Rule;
|
|
173
180
|
noParse(value: RspackModule['noParse']): this;
|
|
174
181
|
}
|
|
@@ -177,6 +184,7 @@ export declare namespace RspackChain {
|
|
|
177
184
|
|
|
178
185
|
class Output extends ChainedMap<RspackChain> {
|
|
179
186
|
assetModuleFilename(value: RspackOutput['assetModuleFilename']): this;
|
|
187
|
+
asyncChunks(value: RspackOutput['asyncChunks']): this;
|
|
180
188
|
bundlerInfo(value: RspackOutput['bundlerInfo']): this;
|
|
181
189
|
chunkFilename(value: RspackOutput['chunkFilename']): this;
|
|
182
190
|
chunkLoadTimeout(value: RspackOutput['chunkLoadTimeout']): this;
|
|
@@ -184,6 +192,8 @@ export declare namespace RspackChain {
|
|
|
184
192
|
chunkLoading(value: RspackOutput['chunkLoading']): this;
|
|
185
193
|
chunkFormat(value: RspackOutput['chunkFormat']): this;
|
|
186
194
|
crossOriginLoading(value: RspackOutput['crossOriginLoading']): this;
|
|
195
|
+
cssChunkFilename(value: RspackOutput['cssChunkFilename']): this;
|
|
196
|
+
cssFilename(value: RspackOutput['cssFilename']): this;
|
|
187
197
|
devtoolFallbackModuleFilenameTemplate(
|
|
188
198
|
value: RspackOutput['devtoolFallbackModuleFilenameTemplate'],
|
|
189
199
|
): this;
|
|
@@ -206,6 +216,7 @@ export declare namespace RspackChain {
|
|
|
206
216
|
hotUpdateMainFilename(value: RspackOutput['hotUpdateMainFilename']): this;
|
|
207
217
|
library(value: RspackOutput['library']): this;
|
|
208
218
|
importFunctionName(value: RspackOutput['importFunctionName']): this;
|
|
219
|
+
importMetaName(value: RspackOutput['importMetaName']): this;
|
|
209
220
|
path(value: RspackOutput['path']): this;
|
|
210
221
|
pathinfo(value: RspackOutput['pathinfo']): this;
|
|
211
222
|
publicPath(value: RspackOutput['publicPath']): this;
|
|
@@ -217,7 +228,10 @@ export declare namespace RspackChain {
|
|
|
217
228
|
strictModuleExceptionHandling(
|
|
218
229
|
value: RspackOutput['strictModuleExceptionHandling'],
|
|
219
230
|
): this;
|
|
231
|
+
trustedTypes(value: RspackOutput['trustedTypes']): this;
|
|
220
232
|
workerChunkLoading(value: RspackOutput['workerChunkLoading']): this;
|
|
233
|
+
workerPublicPath(value: RspackOutput['workerPublicPath']): this;
|
|
234
|
+
workerWasmLoading(value: RspackOutput['workerWasmLoading']): this;
|
|
221
235
|
enabledLibraryTypes(value: RspackOutput['enabledLibraryTypes']): this;
|
|
222
236
|
environment(value: RspackOutput['environment']): this;
|
|
223
237
|
compareBeforeEmit(value: RspackOutput['compareBeforeEmit']): this;
|
|
@@ -243,6 +257,7 @@ export declare namespace RspackChain {
|
|
|
243
257
|
|
|
244
258
|
class DevServer extends TypedChainedMap<RspackChain, RspackDevServer> {}
|
|
245
259
|
|
|
260
|
+
// rslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
246
261
|
interface DevServer extends DevServerShorthandMethods<DevServer> {}
|
|
247
262
|
|
|
248
263
|
type RspackPerformance = Exclude<
|
|
@@ -289,16 +304,15 @@ export declare namespace RspackChain {
|
|
|
289
304
|
>;
|
|
290
305
|
byDependency: TypedChainedMap<this, RspackResolve['byDependency']>;
|
|
291
306
|
enforceExtension(value: RspackResolve['enforceExtension']): this;
|
|
307
|
+
fullySpecified(value: RspackResolve['fullySpecified']): this;
|
|
308
|
+
pnp(value: RspackResolve['pnp']): this;
|
|
292
309
|
symlinks(value: RspackResolve['symlinks']): this;
|
|
293
310
|
preferRelative(value: RspackResolve['preferRelative']): this;
|
|
294
311
|
preferAbsolute(value: RspackResolve['preferAbsolute']): this;
|
|
295
312
|
|
|
296
313
|
tsConfig(value: RspackResolve['tsConfig']): this;
|
|
297
314
|
}
|
|
298
|
-
|
|
299
|
-
class RuleResolve<T = RspackChain> extends Resolve<T> {
|
|
300
|
-
fullySpecified(value: boolean): this;
|
|
301
|
-
}
|
|
315
|
+
class RuleResolve<T = RspackChain> extends Resolve<T> {}
|
|
302
316
|
|
|
303
317
|
class ResolveLoader extends Resolve {
|
|
304
318
|
modules: ChainedSet<this>;
|
|
@@ -317,16 +331,20 @@ export declare namespace RspackChain {
|
|
|
317
331
|
resolve: RuleResolve<Rule<T>>;
|
|
318
332
|
|
|
319
333
|
dependency(value: RspackRuleSet['dependency']): this;
|
|
334
|
+
descriptionData(value: RspackRuleSet['descriptionData']): this;
|
|
320
335
|
enforce(value: RspackRuleSet['enforce']): this;
|
|
336
|
+
extractSourceMap(value: RspackRuleSet['extractSourceMap']): this;
|
|
321
337
|
issuer(value: RspackRuleSet['issuer']): this;
|
|
322
338
|
issuerLayer(value: RspackRuleSet['issuerLayer']): this;
|
|
323
339
|
layer(value: RspackRuleSet['layer']): this;
|
|
324
340
|
mimetype(value: RspackRuleSet['mimetype']): this;
|
|
341
|
+
phase(value: RspackRuleSet['phase']): this;
|
|
325
342
|
parser(value: RspackRuleSet['parser']): this;
|
|
326
343
|
generator(value: RspackRuleSet['generator']): this;
|
|
327
344
|
resource(value: RspackRuleSet['resource']): this;
|
|
328
345
|
resourceFragment(value: RspackRuleSet['resourceFragment']): this;
|
|
329
346
|
resourceQuery(value: RspackRuleSet['resourceQuery']): this;
|
|
347
|
+
scheme(value: RspackRuleSet['scheme']): this;
|
|
330
348
|
sideEffects(value: RspackRuleSet['sideEffects']): this;
|
|
331
349
|
with(value: RspackRuleSet['with']): this;
|
|
332
350
|
test(value: RspackRuleSet['test']): this;
|
|
@@ -386,10 +404,15 @@ export declare namespace RspackChain {
|
|
|
386
404
|
[name: string]: any;
|
|
387
405
|
}
|
|
388
406
|
|
|
407
|
+
type LoaderParallelOptions = NonNullable<
|
|
408
|
+
RuleSetLoaderWithOptions['parallel']
|
|
409
|
+
>;
|
|
410
|
+
|
|
389
411
|
class Use<Parent = Rule> extends ChainedMap<Parent> implements Orderable {
|
|
412
|
+
ident(value: NonNullable<RuleSetLoaderWithOptions['ident']>): this;
|
|
390
413
|
loader(value: string): this;
|
|
391
414
|
options(value: LoaderOptions): this;
|
|
392
|
-
parallel(value:
|
|
415
|
+
parallel(value: LoaderParallelOptions): this;
|
|
393
416
|
|
|
394
417
|
tap(f: (options: LoaderOptions) => LoaderOptions): this;
|
|
395
418
|
|
package/dist/349.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
let CSS_MODULE_REGEX = /\.module(s)?\.\w+$/i, CSS_ICSS_REGEX = /\.icss\.\w+$/i, isCSSModules = (modules, loaderContext)=>{
|
|
2
|
+
if (!modules) return !1;
|
|
3
|
+
if (!0 === modules || 'string' == typeof modules) return !0;
|
|
4
|
+
let { auto } = modules;
|
|
5
|
+
if (void 0 === auto) return !0;
|
|
6
|
+
if (!1 === auto) return !1;
|
|
7
|
+
let resourcePath = loaderContext._module?.matchResource || loaderContext.resourcePath;
|
|
8
|
+
return auto instanceof RegExp ? auto.test(resourcePath) : 'function' == typeof auto ? auto(resourcePath, loaderContext.resourceQuery, loaderContext.resourceFragment) : CSS_MODULE_REGEX.test(resourcePath) || CSS_ICSS_REGEX.test(resourcePath);
|
|
9
|
+
};
|
|
10
|
+
export { isCSSModules };
|