@rspack-canary/browser 1.5.3-canary-21e07ae4-20250903090509 → 1.5.3-canary-e5a6ac07-20250908084040
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.
|
@@ -4,6 +4,9 @@ interface ResolvedRequest {
|
|
|
4
4
|
issuer: string;
|
|
5
5
|
packageName: string;
|
|
6
6
|
}
|
|
7
|
+
interface ProcessedRequest extends ResolvedRequest {
|
|
8
|
+
url: URL;
|
|
9
|
+
}
|
|
7
10
|
interface BrowserHttpImportPluginOptions {
|
|
8
11
|
/**
|
|
9
12
|
* ESM CDN domain
|
|
@@ -22,37 +25,13 @@ interface BrowserHttpImportPluginOptions {
|
|
|
22
25
|
*/
|
|
23
26
|
dependencyVersions?: Record<string, string | undefined>;
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
28
|
+
* You can attach additional queries supported by the CDN to the `request.url`.
|
|
26
29
|
*
|
|
27
|
-
*
|
|
28
|
-
* @see https://esm.sh/#bundling-strategy
|
|
29
|
-
*/
|
|
30
|
-
bundle?: (resolvedRequest: ResolvedRequest) => boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Specify which exported members to include from the dependency if you want to import only a specific set of members.
|
|
33
|
-
* This option will attach `?exports=<value>` query to the final URL.
|
|
34
|
-
*
|
|
35
|
-
* You should make sure your cdn domain supports this behavior.
|
|
36
|
-
* @see https://esm.sh/#tree-shaking
|
|
37
|
-
*/
|
|
38
|
-
exports?: (resolvedRequest: ResolvedRequest) => string[];
|
|
39
|
-
/**
|
|
40
|
-
* Specify which packages to be bundled under development mode.
|
|
41
|
-
* This option will attach `?dev` query to the final URL if true.
|
|
42
|
-
*
|
|
43
|
-
* You should make sure your cdn domain supports this behavior.
|
|
44
|
-
* @see https://esm.sh/#development-build
|
|
45
|
-
*/
|
|
46
|
-
dev?: string[] | ((resolvedRequest: ResolvedRequest) => boolean);
|
|
47
|
-
/**
|
|
48
|
-
* Specify external dependencies.
|
|
49
|
-
* This is useful if you don't want to include multiple instances of a package introduced by different dependencies.
|
|
50
|
-
* This option will attach `?external=<value>` query to the final URL.
|
|
30
|
+
* For example, to specify the external dependencies under esm.sh, you can do:
|
|
51
31
|
*
|
|
52
|
-
*
|
|
53
|
-
* @see https://esm.sh/#using-import-maps
|
|
32
|
+
* `request.url.searchParams.set("external", "react,react-dom")`
|
|
54
33
|
*/
|
|
55
|
-
|
|
34
|
+
postprocess?: (request: ProcessedRequest) => void;
|
|
56
35
|
}
|
|
57
36
|
/**
|
|
58
37
|
* Convert imports of dependencies in node modules to http imports from esm cdn.
|
package/dist/index.mjs
CHANGED
|
@@ -47072,7 +47072,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
47072
47072
|
if ("object" == typeof rspackFuture) {
|
|
47073
47073
|
D(rspackFuture, "bundlerInfo", {});
|
|
47074
47074
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
47075
|
-
D(rspackFuture.bundlerInfo, "version", "1.5.3-canary-
|
|
47075
|
+
D(rspackFuture.bundlerInfo, "version", "1.5.3-canary-e5a6ac07-20250908084040");
|
|
47076
47076
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
47077
47077
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
47078
47078
|
}
|
|
@@ -51167,7 +51167,7 @@ class MultiStats {
|
|
|
51167
51167
|
return obj;
|
|
51168
51168
|
});
|
|
51169
51169
|
if (childOptions.version) {
|
|
51170
|
-
obj.rspackVersion = "1.5.3-canary-
|
|
51170
|
+
obj.rspackVersion = "1.5.3-canary-e5a6ac07-20250908084040";
|
|
51171
51171
|
obj.version = "5.75.0";
|
|
51172
51172
|
}
|
|
51173
51173
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -52477,7 +52477,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
52477
52477
|
},
|
|
52478
52478
|
version: (object)=>{
|
|
52479
52479
|
object.version = "5.75.0";
|
|
52480
|
-
object.rspackVersion = "1.5.3-canary-
|
|
52480
|
+
object.rspackVersion = "1.5.3-canary-e5a6ac07-20250908084040";
|
|
52481
52481
|
},
|
|
52482
52482
|
env: (object, _compilation, _context, { _env })=>{
|
|
52483
52483
|
object.env = _env;
|
|
@@ -56926,7 +56926,7 @@ function transformSync(source, options) {
|
|
|
56926
56926
|
const _options = JSON.stringify(options || {});
|
|
56927
56927
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
56928
56928
|
}
|
|
56929
|
-
const exports_rspackVersion = "1.5.3-canary-
|
|
56929
|
+
const exports_rspackVersion = "1.5.3-canary-e5a6ac07-20250908084040";
|
|
56930
56930
|
const exports_version = "5.75.0";
|
|
56931
56931
|
const exports_WebpackError = Error;
|
|
56932
56932
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -57155,23 +57155,12 @@ class BrowserHttpImportEsmPlugin {
|
|
|
57155
57155
|
return `${domain}/${versionedRequest}`;
|
|
57156
57156
|
}
|
|
57157
57157
|
parameterize(requestUrl, resolvedRequest) {
|
|
57158
|
+
if (!this.options.postprocess) return requestUrl;
|
|
57158
57159
|
const url = new URL(requestUrl);
|
|
57159
|
-
|
|
57160
|
-
|
|
57161
|
-
|
|
57162
|
-
}
|
|
57163
|
-
if (this.options.exports) {
|
|
57164
|
-
const exports = this.options.exports(resolvedRequest);
|
|
57165
|
-
if (exports.length > 0) url.searchParams.set("exports", exports.join(","));
|
|
57166
|
-
}
|
|
57167
|
-
if (this.options.dev) if ("function" == typeof this.options.dev) {
|
|
57168
|
-
const dev = this.options.dev(resolvedRequest);
|
|
57169
|
-
if (dev) url.searchParams.set("dev", "");
|
|
57170
|
-
} else {
|
|
57171
|
-
const dev = this.options.dev.includes(resolvedRequest.packageName);
|
|
57172
|
-
if (dev) url.searchParams.set("dev", "");
|
|
57173
|
-
}
|
|
57174
|
-
if (this.options.externals && this.options.externals.length > 0) url.searchParams.set("external", this.options.externals.join(","));
|
|
57160
|
+
this.options.postprocess({
|
|
57161
|
+
url,
|
|
57162
|
+
...resolvedRequest
|
|
57163
|
+
});
|
|
57175
57164
|
return url.toString();
|
|
57176
57165
|
}
|
|
57177
57166
|
isNodeModule(request) {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.5.3-canary-
|
|
3
|
+
"version": "1.5.3-canary-e5a6ac07-20250908084040",
|
|
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.",
|