@rspack/browser 1.6.3 → 1.6.5
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.
|
@@ -14,6 +14,7 @@ export declare const RuntimePluginImpl: {
|
|
|
14
14
|
};
|
|
15
15
|
export type RuntimePluginHooks = {
|
|
16
16
|
createScript: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
17
|
+
createLink: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
17
18
|
linkPreload: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
18
19
|
linkPrefetch: liteTapable.SyncWaterfallHook<[string, Chunk]>;
|
|
19
20
|
};
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
|
8
8
|
* https://github.com/webpack/webpack-dev-server/blob/master/LICENSE
|
|
9
9
|
*/
|
|
10
|
+
import type * as http from "node:http";
|
|
11
|
+
import type * as net from "node:net";
|
|
12
|
+
import type * as stream from "node:stream";
|
|
13
|
+
import type * as url from "node:url";
|
|
10
14
|
import type { Compiler, LiteralUnion, MultiCompiler, MultiStats, Stats, Watching } from "..";
|
|
11
15
|
type Logger = ReturnType<Compiler["getInfrastructureLogger"]>;
|
|
12
16
|
type MultiWatching = MultiCompiler["watch"];
|
|
@@ -126,9 +130,7 @@ type ProxyConfigArrayItem = {
|
|
|
126
130
|
context?: HttpProxyMiddlewareOptionsFilter;
|
|
127
131
|
} & {
|
|
128
132
|
bypass?: ByPass;
|
|
129
|
-
} &
|
|
130
|
-
[key: string]: any;
|
|
131
|
-
};
|
|
133
|
+
} & HttpProxyMiddlewareOptions;
|
|
132
134
|
type ByPass = (req: Request, res: Response, proxyConfig: ProxyConfigArrayItem) => any;
|
|
133
135
|
type ProxyConfigArray = (ProxyConfigArrayItem | ((req?: Request, res?: Response, next?: NextFunction) => ProxyConfigArrayItem))[];
|
|
134
136
|
type Callback = (stats?: Stats | MultiStats) => any;
|
|
@@ -203,4 +205,110 @@ export type DevServerOptions<A extends BasicApplication = BasicApplication, S ex
|
|
|
203
205
|
onListening?: ((devServer: Server) => void) | undefined;
|
|
204
206
|
setupMiddlewares?: ((middlewares: Middleware[], devServer: Server) => Middleware[]) | undefined;
|
|
205
207
|
};
|
|
208
|
+
interface HttpProxyMiddlewareOptions extends HttpProxyServerOptions {
|
|
209
|
+
pathRewrite?: {
|
|
210
|
+
[regexp: string]: string;
|
|
211
|
+
} | ((path: string, req: Request) => string) | ((path: string, req: Request) => Promise<string>);
|
|
212
|
+
router?: {
|
|
213
|
+
[hostOrPath: string]: HttpProxyServerOptions["target"];
|
|
214
|
+
} | ((req: Request) => HttpProxyServerOptions["target"]) | ((req: Request) => Promise<HttpProxyServerOptions["target"]>);
|
|
215
|
+
logLevel?: "debug" | "info" | "warn" | "error" | "silent";
|
|
216
|
+
logProvider?: LogProviderCallback;
|
|
217
|
+
onError?: OnErrorCallback;
|
|
218
|
+
onProxyRes?: OnProxyResCallback;
|
|
219
|
+
onProxyReq?: OnProxyReqCallback;
|
|
220
|
+
onProxyReqWs?: OnProxyReqWsCallback;
|
|
221
|
+
onOpen?: OnOpenCallback;
|
|
222
|
+
onClose?: OnCloseCallback;
|
|
223
|
+
}
|
|
224
|
+
interface LogProvider {
|
|
225
|
+
log: Logger;
|
|
226
|
+
debug?: Logger;
|
|
227
|
+
info?: Logger;
|
|
228
|
+
warn?: Logger;
|
|
229
|
+
error?: Logger;
|
|
230
|
+
}
|
|
231
|
+
type LogProviderCallback = (provider: LogProvider) => LogProvider;
|
|
232
|
+
type OnErrorCallback = (err: Error, req: Request, res: Response, target?: string | Partial<url.Url>) => void;
|
|
233
|
+
type OnProxyResCallback = (proxyRes: http.IncomingMessage, req: Request, res: Response) => void;
|
|
234
|
+
type OnProxyReqCallback = (proxyReq: http.ClientRequest, req: Request, res: Response, options: HttpProxyServerOptions) => void;
|
|
235
|
+
type OnProxyReqWsCallback = (proxyReq: http.ClientRequest, req: Request, socket: net.Socket, options: HttpProxyServerOptions, head: any) => void;
|
|
236
|
+
type OnCloseCallback = (proxyRes: Response, proxySocket: net.Socket, proxyHead: any) => void;
|
|
237
|
+
type OnOpenCallback = (proxySocket: net.Socket) => void;
|
|
238
|
+
interface HttpProxyServerOptions {
|
|
239
|
+
/** URL string to be parsed with the url module. */
|
|
240
|
+
target?: HttpProxyTarget | undefined;
|
|
241
|
+
/** URL string to be parsed with the url module. */
|
|
242
|
+
forward?: HttpProxyTargetUrl | undefined;
|
|
243
|
+
/** Object to be passed to http(s).request. */
|
|
244
|
+
agent?: any;
|
|
245
|
+
/** Object to be passed to https.createServer(). */
|
|
246
|
+
ssl?: any;
|
|
247
|
+
/** If you want to proxy websockets. */
|
|
248
|
+
ws?: boolean | undefined;
|
|
249
|
+
/** Adds x- forward headers. */
|
|
250
|
+
xfwd?: boolean | undefined;
|
|
251
|
+
/** Verify SSL certificate. */
|
|
252
|
+
secure?: boolean | undefined;
|
|
253
|
+
/** Explicitly specify if we are proxying to another proxy. */
|
|
254
|
+
toProxy?: boolean | undefined;
|
|
255
|
+
/** Specify whether you want to prepend the target's path to the proxy path. */
|
|
256
|
+
prependPath?: boolean | undefined;
|
|
257
|
+
/** Specify whether you want to ignore the proxy path of the incoming request. */
|
|
258
|
+
ignorePath?: boolean | undefined;
|
|
259
|
+
/** Local interface string to bind for outgoing connections. */
|
|
260
|
+
localAddress?: string | undefined;
|
|
261
|
+
/** Changes the origin of the host header to the target URL. */
|
|
262
|
+
changeOrigin?: boolean | undefined;
|
|
263
|
+
/** specify whether you want to keep letter case of response header key */
|
|
264
|
+
preserveHeaderKeyCase?: boolean | undefined;
|
|
265
|
+
/** Basic authentication i.e. 'user:password' to compute an Authorization header. */
|
|
266
|
+
auth?: string | undefined;
|
|
267
|
+
/** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
|
|
268
|
+
hostRewrite?: string | undefined;
|
|
269
|
+
/** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
|
|
270
|
+
autoRewrite?: boolean | undefined;
|
|
271
|
+
/** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
|
|
272
|
+
protocolRewrite?: string | undefined;
|
|
273
|
+
/** rewrites domain of set-cookie headers. */
|
|
274
|
+
cookieDomainRewrite?: false | string | {
|
|
275
|
+
[oldDomain: string]: string;
|
|
276
|
+
} | undefined;
|
|
277
|
+
/** rewrites path of set-cookie headers. Default: false */
|
|
278
|
+
cookiePathRewrite?: false | string | {
|
|
279
|
+
[oldPath: string]: string;
|
|
280
|
+
} | undefined;
|
|
281
|
+
/** object with extra headers to be added to target requests. */
|
|
282
|
+
headers?: {
|
|
283
|
+
[header: string]: string;
|
|
284
|
+
} | undefined;
|
|
285
|
+
/** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
|
|
286
|
+
proxyTimeout?: number | undefined;
|
|
287
|
+
/** Timeout (in milliseconds) for incoming requests */
|
|
288
|
+
timeout?: number | undefined;
|
|
289
|
+
/** Specify whether you want to follow redirects. Default: false */
|
|
290
|
+
followRedirects?: boolean | undefined;
|
|
291
|
+
/** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */
|
|
292
|
+
selfHandleResponse?: boolean | undefined;
|
|
293
|
+
/** Buffer */
|
|
294
|
+
buffer?: stream.Stream | undefined;
|
|
295
|
+
/** Explicitly set the method type of the ProxyReq */
|
|
296
|
+
method?: string | undefined;
|
|
297
|
+
}
|
|
298
|
+
interface HttpProxyTargetDetailed {
|
|
299
|
+
host: string;
|
|
300
|
+
port: number;
|
|
301
|
+
protocol?: string | undefined;
|
|
302
|
+
hostname?: string | undefined;
|
|
303
|
+
socketPath?: string | undefined;
|
|
304
|
+
key?: string | undefined;
|
|
305
|
+
passphrase?: string | undefined;
|
|
306
|
+
pfx?: Buffer | string | undefined;
|
|
307
|
+
cert?: string | undefined;
|
|
308
|
+
ca?: string | undefined;
|
|
309
|
+
ciphers?: string | undefined;
|
|
310
|
+
secureProtocol?: string | undefined;
|
|
311
|
+
}
|
|
312
|
+
type HttpProxyTarget = HttpProxyTargetUrl | HttpProxyTargetDetailed;
|
|
313
|
+
type HttpProxyTargetUrl = string | Partial<url.Url>;
|
|
206
314
|
export {};
|
package/dist/index.mjs
CHANGED
|
@@ -2738,7 +2738,7 @@ var __webpack_modules__ = {
|
|
|
2738
2738
|
BN.wordSize = 26;
|
|
2739
2739
|
var Buffer;
|
|
2740
2740
|
try {
|
|
2741
|
-
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?
|
|
2741
|
+
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?4fc0").Buffer;
|
|
2742
2742
|
} catch (e) {}
|
|
2743
2743
|
BN.isBN = function(num) {
|
|
2744
2744
|
if (num instanceof BN) return true;
|
|
@@ -5228,7 +5228,7 @@ var __webpack_modules__ = {
|
|
|
5228
5228
|
BN.wordSize = 26;
|
|
5229
5229
|
var Buffer;
|
|
5230
5230
|
try {
|
|
5231
|
-
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?
|
|
5231
|
+
Buffer = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : __webpack_require__("?dcfb").Buffer;
|
|
5232
5232
|
} catch (e) {}
|
|
5233
5233
|
BN.isBN = function(num) {
|
|
5234
5234
|
if (num instanceof BN) return true;
|
|
@@ -7776,7 +7776,7 @@ var __webpack_modules__ = {
|
|
|
7776
7776
|
throw new Error('Not implemented yet');
|
|
7777
7777
|
};
|
|
7778
7778
|
} else try {
|
|
7779
|
-
var crypto = __webpack_require__("?
|
|
7779
|
+
var crypto = __webpack_require__("?69f8");
|
|
7780
7780
|
if ('function' != typeof crypto.randomBytes) throw new Error('Not supported');
|
|
7781
7781
|
Rand.prototype._rand = function(n) {
|
|
7782
7782
|
return crypto.randomBytes(n);
|
|
@@ -18975,7 +18975,7 @@ var __webpack_modules__ = {
|
|
|
18975
18975
|
}
|
|
18976
18976
|
return $replace.call(str, sepRegex, '$&_');
|
|
18977
18977
|
}
|
|
18978
|
-
var utilInspect = __webpack_require__("?
|
|
18978
|
+
var utilInspect = __webpack_require__("?f42a");
|
|
18979
18979
|
var inspectCustom = utilInspect.custom;
|
|
18980
18980
|
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
18981
18981
|
var quotes = {
|
|
@@ -24912,7 +24912,7 @@ var __webpack_modules__ = {
|
|
|
24912
24912
|
}
|
|
24913
24913
|
var util = Object.create(__webpack_require__("../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"));
|
|
24914
24914
|
util.inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
|
|
24915
|
-
var debugUtil = __webpack_require__("?
|
|
24915
|
+
var debugUtil = __webpack_require__("?b05f");
|
|
24916
24916
|
var debug = void 0;
|
|
24917
24917
|
debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
|
|
24918
24918
|
var BufferList = __webpack_require__("../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js");
|
|
@@ -26032,7 +26032,7 @@ var __webpack_modules__ = {
|
|
|
26032
26032
|
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
26033
26033
|
}
|
|
26034
26034
|
var Buffer = __webpack_require__("../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js").Buffer;
|
|
26035
|
-
var util = __webpack_require__("?
|
|
26035
|
+
var util = __webpack_require__("?5f4e");
|
|
26036
26036
|
function copyBuffer(src, target, offset) {
|
|
26037
26037
|
src.copy(target, offset);
|
|
26038
26038
|
}
|
|
@@ -26348,7 +26348,7 @@ var __webpack_modules__ = {
|
|
|
26348
26348
|
function _isUint8Array(obj) {
|
|
26349
26349
|
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
26350
26350
|
}
|
|
26351
|
-
var debugUtil = __webpack_require__("?
|
|
26351
|
+
var debugUtil = __webpack_require__("?8beb");
|
|
26352
26352
|
var debug;
|
|
26353
26353
|
debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
|
|
26354
26354
|
var BufferList = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js");
|
|
@@ -27725,7 +27725,7 @@ var __webpack_modules__ = {
|
|
|
27725
27725
|
return ("string" === hint ? String : Number)(input);
|
|
27726
27726
|
}
|
|
27727
27727
|
var _require = __webpack_require__("./src/browser/buffer.ts"), Buffer = _require.Buffer;
|
|
27728
|
-
var _require2 = __webpack_require__("?
|
|
27728
|
+
var _require2 = __webpack_require__("?c028"), inspect = _require2.inspect;
|
|
27729
27729
|
var custom = inspect && inspect.custom || 'inspect';
|
|
27730
27730
|
function copyBuffer(src, target, offset) {
|
|
27731
27731
|
Buffer.prototype.copy.call(src, target, offset);
|
|
@@ -35341,14 +35341,14 @@ var __webpack_modules__ = {
|
|
|
35341
35341
|
"@rspack/binding": function(module1) {
|
|
35342
35342
|
module1.exports = __WEBPACK_EXTERNAL_MODULE__rspack_wasi_browser_js_bd433424__;
|
|
35343
35343
|
},
|
|
35344
|
-
"?
|
|
35345
|
-
"?
|
|
35346
|
-
"?
|
|
35347
|
-
"?
|
|
35348
|
-
"?
|
|
35349
|
-
"?
|
|
35350
|
-
"?
|
|
35351
|
-
"?
|
|
35344
|
+
"?4fc0": function() {},
|
|
35345
|
+
"?dcfb": function() {},
|
|
35346
|
+
"?69f8": function() {},
|
|
35347
|
+
"?f42a": function() {},
|
|
35348
|
+
"?5f4e": function() {},
|
|
35349
|
+
"?b05f": function() {},
|
|
35350
|
+
"?c028": function() {},
|
|
35351
|
+
"?8beb": function() {},
|
|
35352
35352
|
"../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
35353
35353
|
var possibleNames = __webpack_require__("../../node_modules/.pnpm/possible-typed-array-names@1.1.0/node_modules/possible-typed-array-names/index.js");
|
|
35354
35354
|
var g = 'undefined' == typeof globalThis ? __webpack_require__.g : globalThis;
|
|
@@ -56606,6 +56606,10 @@ RuntimePlugin.getHooks = RuntimePlugin.getCompilationHooks = (compilation)=>{
|
|
|
56606
56606
|
"code",
|
|
56607
56607
|
"chunk"
|
|
56608
56608
|
]),
|
|
56609
|
+
createLink: new SyncWaterfallHook([
|
|
56610
|
+
"code",
|
|
56611
|
+
"chunk"
|
|
56612
|
+
]),
|
|
56609
56613
|
linkPreload: new SyncWaterfallHook([
|
|
56610
56614
|
"code",
|
|
56611
56615
|
"chunk"
|
|
@@ -56627,6 +56631,13 @@ const createRuntimePluginHooksRegisters = (getCompiler, createTap)=>({
|
|
|
56627
56631
|
return queried.call(data.code, data.chunk);
|
|
56628
56632
|
};
|
|
56629
56633
|
}),
|
|
56634
|
+
registerRuntimePluginCreateLinkTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.RuntimePluginCreateLink, function() {
|
|
56635
|
+
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).createLink;
|
|
56636
|
+
}, function(queried) {
|
|
56637
|
+
return function(data) {
|
|
56638
|
+
return queried.call(data.code, data.chunk);
|
|
56639
|
+
};
|
|
56640
|
+
}),
|
|
56630
56641
|
registerRuntimePluginLinkPreloadTaps: createTap(external_rspack_wasi_browser_js_["default"].RegisterJsTapKind.RuntimePluginLinkPreload, function() {
|
|
56631
56642
|
return RuntimePlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).linkPreload;
|
|
56632
56643
|
}, function(queried) {
|
|
@@ -56755,6 +56766,7 @@ function SubresourceIntegrityPlugin_define_property(obj, key, value) {
|
|
|
56755
56766
|
}
|
|
56756
56767
|
const SubresourceIntegrityPlugin_PLUGIN_NAME = "SubresourceIntegrityPlugin";
|
|
56757
56768
|
const NATIVE_HTML_PLUGIN = "HtmlRspackPlugin";
|
|
56769
|
+
const HTTP_PROTOCOL_REGEX = /^https?:/;
|
|
56758
56770
|
const NativeSubresourceIntegrityPlugin = base_create(external_rspack_wasi_browser_js_.BuiltinPluginName.SubresourceIntegrityPlugin, function(options) {
|
|
56759
56771
|
let htmlPlugin = "Disabled";
|
|
56760
56772
|
if (options.htmlPlugin === NATIVE_HTML_PLUGIN) htmlPlugin = "Native";
|
|
@@ -56792,7 +56804,25 @@ class SubresourceIntegrityPlugin extends NativeSubresourceIntegrityPlugin {
|
|
|
56792
56804
|
if (tag.attributes && "integrity" in tag.attributes) return;
|
|
56793
56805
|
const tagSrc = getTagSrc(tag);
|
|
56794
56806
|
if (!tagSrc) return;
|
|
56795
|
-
|
|
56807
|
+
let isUrlSrc = false;
|
|
56808
|
+
try {
|
|
56809
|
+
const url = new URL(tagSrc);
|
|
56810
|
+
isUrlSrc = "http:" === url.protocol || "https:" === url.protocol;
|
|
56811
|
+
} catch (_) {
|
|
56812
|
+
isUrlSrc = tagSrc.startsWith("//");
|
|
56813
|
+
}
|
|
56814
|
+
let src = "";
|
|
56815
|
+
if (isUrlSrc) {
|
|
56816
|
+
if (!publicPath) return;
|
|
56817
|
+
const protocolRelativePublicPath = publicPath.replace(HTTP_PROTOCOL_REGEX, "");
|
|
56818
|
+
const protocolRelativeTagSrc = tagSrc.replace(HTTP_PROTOCOL_REGEX, "");
|
|
56819
|
+
if (!protocolRelativeTagSrc.startsWith(protocolRelativePublicPath)) return;
|
|
56820
|
+
{
|
|
56821
|
+
const tagSrcWithScheme = `http:${protocolRelativeTagSrc}`;
|
|
56822
|
+
const publicPathWithScheme = protocolRelativePublicPath.startsWith("//") ? `http:${protocolRelativePublicPath}` : protocolRelativePublicPath;
|
|
56823
|
+
src = (0, path_browserify.relative)(publicPathWithScheme, decodeURIComponent(tagSrcWithScheme));
|
|
56824
|
+
}
|
|
56825
|
+
} else src = (0, path_browserify.relative)(publicPath, decodeURIComponent(tagSrc));
|
|
56796
56826
|
tag.attributes.integrity = this.getIntegrityChecksumForAsset(src) || computeIntegrity(this.options.hashFuncNames, (0, browser_fs.readFileSync)((0, path_browserify.join)(outputPath, src)));
|
|
56797
56827
|
tag.attributes.crossorigin = crossOriginLoading || "anonymous";
|
|
56798
56828
|
}
|
|
@@ -58126,7 +58156,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58126
58156
|
if ("object" == typeof rspackFuture) {
|
|
58127
58157
|
D(rspackFuture, "bundlerInfo", {});
|
|
58128
58158
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58129
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.
|
|
58159
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.5");
|
|
58130
58160
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58131
58161
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58132
58162
|
}
|
|
@@ -62075,7 +62105,7 @@ class MultiStats {
|
|
|
62075
62105
|
return obj;
|
|
62076
62106
|
});
|
|
62077
62107
|
if (childOptions.version) {
|
|
62078
|
-
obj.rspackVersion = "1.6.
|
|
62108
|
+
obj.rspackVersion = "1.6.5";
|
|
62079
62109
|
obj.version = "5.75.0";
|
|
62080
62110
|
}
|
|
62081
62111
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -63380,7 +63410,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63380
63410
|
},
|
|
63381
63411
|
version: (object)=>{
|
|
63382
63412
|
object.version = "5.75.0";
|
|
63383
|
-
object.rspackVersion = "1.6.
|
|
63413
|
+
object.rspackVersion = "1.6.5";
|
|
63384
63414
|
},
|
|
63385
63415
|
env: (object, _compilation, _context, { _env })=>{
|
|
63386
63416
|
object.env = _env;
|
|
@@ -66517,7 +66547,7 @@ function transformSync(source, options) {
|
|
|
66517
66547
|
const _options = JSON.stringify(options || {});
|
|
66518
66548
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66519
66549
|
}
|
|
66520
|
-
const exports_rspackVersion = "1.6.
|
|
66550
|
+
const exports_rspackVersion = "1.6.5";
|
|
66521
66551
|
const exports_version = "5.75.0";
|
|
66522
66552
|
const exports_WebpackError = Error;
|
|
66523
66553
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -772,6 +772,11 @@ export interface JsCreateData {
|
|
|
772
772
|
resource: string
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
+
export interface JsCreateLinkData {
|
|
776
|
+
code: string
|
|
777
|
+
chunk: Chunk
|
|
778
|
+
}
|
|
779
|
+
|
|
775
780
|
export interface JsCreateScriptData {
|
|
776
781
|
code: string
|
|
777
782
|
chunk: Chunk
|
|
@@ -1512,6 +1517,8 @@ export interface KnownAssetInfo {
|
|
|
1512
1517
|
cssUnusedIdents?: Array<string>
|
|
1513
1518
|
/** whether this asset is over the size limit */
|
|
1514
1519
|
isOverSizeLimit?: boolean
|
|
1520
|
+
/** the asset type */
|
|
1521
|
+
assetType?: string
|
|
1515
1522
|
}
|
|
1516
1523
|
|
|
1517
1524
|
export declare function loadBrowserslist(input: string | undefined | null, context: string): Array<string> | null
|
|
@@ -2964,13 +2971,14 @@ export declare enum RegisterJsTapKind {
|
|
|
2964
2971
|
HtmlPluginBeforeEmit = 39,
|
|
2965
2972
|
HtmlPluginAfterEmit = 40,
|
|
2966
2973
|
RuntimePluginCreateScript = 41,
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
+
RuntimePluginCreateLink = 42,
|
|
2975
|
+
RuntimePluginLinkPreload = 43,
|
|
2976
|
+
RuntimePluginLinkPrefetch = 44,
|
|
2977
|
+
RsdoctorPluginModuleGraph = 45,
|
|
2978
|
+
RsdoctorPluginChunkGraph = 46,
|
|
2979
|
+
RsdoctorPluginModuleIds = 47,
|
|
2980
|
+
RsdoctorPluginModuleSources = 48,
|
|
2981
|
+
RsdoctorPluginAssets = 49
|
|
2974
2982
|
}
|
|
2975
2983
|
|
|
2976
2984
|
export interface RegisterJsTaps {
|
|
@@ -3016,7 +3024,8 @@ export interface RegisterJsTaps {
|
|
|
3016
3024
|
registerHtmlPluginBeforeEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeEmitData) => JsBeforeEmitData); stage: number; }>
|
|
3017
3025
|
registerHtmlPluginAfterEmitTaps: (stages: Array<number>) => Array<{ function: ((arg: JsAfterEmitData) => JsAfterEmitData); stage: number; }>
|
|
3018
3026
|
registerRuntimePluginCreateScriptTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCreateScriptData) => String); stage: number; }>
|
|
3019
|
-
|
|
3027
|
+
registerRuntimePluginCreateLinkTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPreloadData) => String); stage: number; }>
|
|
3028
|
+
registerRuntimePluginLinkPreloadTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCreateLinkData) => String); stage: number; }>
|
|
3020
3029
|
registerRuntimePluginLinkPrefetchTaps: (stages: Array<number>) => Array<{ function: ((arg: JsLinkPrefetchData) => String); stage: number; }>
|
|
3021
3030
|
registerRsdoctorPluginModuleGraphTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorModuleGraph) => Promise<boolean | undefined>); stage: number; }>
|
|
3022
3031
|
registerRsdoctorPluginChunkGraphTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorChunkGraph) => Promise<boolean | undefined>); stage: number; }>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/browser",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@napi-rs/wasm-runtime": "1.0.7",
|
|
34
34
|
"@rspack/lite-tapable": "1.1.0",
|
|
35
35
|
"@swc/types": "0.1.25",
|
|
36
|
-
"@types/watchpack": "^2.4.
|
|
36
|
+
"@types/watchpack": "^2.4.5",
|
|
37
37
|
"memfs": "4.48.1",
|
|
38
38
|
"webpack-sources": "3.3.3"
|
|
39
39
|
},
|