@rsbuild/core 2.0.3 → 2.0.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.
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 735: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 86: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const { HtmlWebpackChildCompiler } = __nccwpck_require__(828);
5
+ const { HtmlWebpackChildCompiler } = __nccwpck_require__(895);
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
- 828: (module) => {
314
+ 895: (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
- 516: (module) => {
483
+ 741: (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
- 859: (module) => {
502
+ 156: (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
- 858: (module, __unused_webpack_exports, __nccwpck_require__) => {
526
+ 971: (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
- 511: (module) => {
552
+ 322: (module) => {
553
553
  const voidTags = [
554
554
  "area",
555
555
  "base",
@@ -617,19 +617,19 @@
617
617
  htmlTagObjectToString,
618
618
  };
619
619
  },
620
- 390: (module, __unused_webpack_exports, __nccwpck_require__) => {
620
+ 499: (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__(735);
626
+ const { CachedChildCompilation } = __nccwpck_require__(86);
627
627
  const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
628
- __nccwpck_require__(511);
629
- const prettyError = __nccwpck_require__(859);
630
- const chunkSorter = __nccwpck_require__(516);
628
+ __nccwpck_require__(322);
629
+ const prettyError = __nccwpck_require__(156);
630
+ const chunkSorter = __nccwpck_require__(741);
631
631
  const getHtmlRspackPluginHooks =
632
- __nccwpck_require__(858).getHtmlRspackPluginHooks;
632
+ __nccwpck_require__(971).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__(390);
2401
+ var __webpack_exports__ = __nccwpck_require__(499);
2402
2402
  module.exports = __webpack_exports__;
2403
2403
  })();
@@ -5,10 +5,6 @@ import net__default, { Socket } from 'node:net';
5
5
  import http2, { Http2ServerResponse, Http2ServerRequest } from 'node:http2';
6
6
  import { EventEmitter } from 'node:events';
7
7
  import * as stream from 'node:stream';
8
- // @ts-ignore
9
- import { HttpBindings } from '@hono/node-server';
10
- // @ts-ignore
11
- import { MiddlewareHandler } from 'hono';
12
8
 
13
9
  interface ProxyTargetDetailed {
14
10
  host?: string;
@@ -332,29 +328,6 @@ interface Options<TReq extends http.IncomingMessage = http.IncomingMessage, TRes
332
328
  */
333
329
  declare function createProxyMiddleware<TReq extends http.IncomingMessage = http.IncomingMessage, TRes extends http.ServerResponse = http.ServerResponse, TNext = NextFunction>(options: Options<TReq, TRes>): RequestHandler<TReq, TRes, TNext>;
334
330
 
335
- /**
336
- * Creates a Hono middleware that proxies requests using http-proxy-middleware.
337
- *
338
- * `@remarks`
339
- * This middleware requires Hono to be running on Node.js via `@hono/node-server`.
340
- * It uses `c.env.incoming` and `c.env.outgoing` which are only available with `HttpBindings`.
341
- *
342
- * `@experimental` This API is experimental and may change without a major version bump.
343
- *
344
- * `@example`
345
- * ```ts
346
- * import { serve } from '@hono/node-server';
347
- * import { Hono } from 'hono';
348
- * import { createHonoProxyMiddleware } from 'http-proxy-middleware';
349
- *
350
- * const app = new Hono();
351
- * app.use('/api', createHonoProxyMiddleware({ target: 'http://example.com', changeOrigin: true }));
352
- * serve(app);
353
- */
354
- declare function createHonoProxyMiddleware(options: Options): MiddlewareHandler<{
355
- Bindings: HttpBindings;
356
- }>;
357
-
358
331
  type Interceptor<TReq = http.IncomingMessage, TRes = http.ServerResponse> = (buffer: Buffer, proxyRes: http.IncomingMessage, req: TReq, res: TRes) => Promise<Buffer | string>;
359
332
  /**
360
333
  * Intercept responses from upstream.
@@ -405,5 +378,5 @@ declare const loggerPlugin: Plugin;
405
378
  */
406
379
  declare const proxyEventsPlugin: Plugin;
407
380
 
408
- export { createHonoProxyMiddleware, createProxyMiddleware, debugProxyErrorsPlugin, errorResponsePlugin, fixRequestBody, loggerPlugin, proxyEventsPlugin, responseInterceptor };
381
+ export { createProxyMiddleware, debugProxyErrorsPlugin, errorResponsePlugin, fixRequestBody, loggerPlugin, proxyEventsPlugin, responseInterceptor };
409
382
  export type { Filter, Options, Plugin, RequestHandler };
@@ -1 +1 @@
1
- {"name":"http-proxy-middleware","author":"Steven Chim","version":"4.0.0-beta.5","license":"MIT","types":"index.d.ts","type":"module"}
1
+ {"name":"http-proxy-middleware","author":"Steven Chim","version":"4.0.0-beta.6","license":"MIT","types":"index.d.ts","type":"module"}
@@ -171,6 +171,9 @@ Add inline source map to transformed source for better debugging.
171
171
 
172
172
  Jiti combines module exports with the `default` export using an internal Proxy to improve compatibility with mixed CJS/ESM usage. You can check the current implementation [here](https://github.com/unjs/jiti/blob/main/src/utils.ts#L105).
173
173
 
174
+ > [!WARNING]
175
+ > This option wraps **all imported modules** in a Proxy, which adds ~25-50ns overhead per property access. For performance-critical hot paths where you access module exports very frequently, consider setting `interopDefault: false` or `JITI_INTEROP_DEFAULT=false`.
176
+
174
177
  ### `alias`
175
178
 
176
179
  - Type: Object
@@ -181,6 +184,18 @@ You can also pass an object to the environment variable for inline config. Examp
181
184
 
182
185
  Custom alias map used to resolve IDs.
183
186
 
187
+ ### `tsconfigPaths`
188
+
189
+ - Type: Boolean | String
190
+ - Default: `false`
191
+ - Environment variable: `JITI_TSCONFIG_PATHS`
192
+
193
+ Enable TypeScript [`paths`](https://www.typescriptlang.org/tsconfig/#paths) resolution using [`get-tsconfig`](https://github.com/privatenumber/get-tsconfig).
194
+
195
+ - `true`: Auto-discover `tsconfig.json` by walking up from the jiti instance's parent path.
196
+ - `string`: Explicit path to a `tsconfig.json` file.
197
+ - `false` (default): Disabled.
198
+
184
199
  ### `nativeModules`
185
200
 
186
201
  - Type: Array