@rspack/core 1.5.1 → 1.5.2

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.
@@ -40,10 +40,11 @@ function updateCss(el, url) {
40
40
  let normalizedUrl;
41
41
  if (url) normalizedUrl = url;
42
42
  else {
43
- if (!el.href) return;
44
- normalizedUrl = el.href.split("?")[0];
43
+ let href = el.getAttribute("href");
44
+ if (!href) return;
45
+ normalizedUrl = href.split("?")[0];
45
46
  }
46
- if (!isUrlRequest(normalizedUrl) || !1 === el.isLoaded || !normalizedUrl || !(normalizedUrl.indexOf(".css") > -1)) return;
47
+ if (!isUrlRequest(el.href) || !1 === el.isLoaded || !normalizedUrl || !(normalizedUrl.indexOf(".css") > -1)) return;
47
48
  el.visited = !0;
48
49
  let newEl = el.cloneNode();
49
50
  newEl.isLoaded = !1, newEl.addEventListener("load", ()=>{
package/dist/index.js CHANGED
@@ -8650,9 +8650,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
8650
8650
  let tty = infrastructureLogging.stream?.isTTY && "dumb" !== process.env.TERM;
8651
8651
  D(infrastructureLogging, "level", "info"), D(infrastructureLogging, "debug", !1), D(infrastructureLogging, "colors", tty), D(infrastructureLogging, "appendOnly", !tty);
8652
8652
  }, applyExperimentsDefaults = (experiments, { production, development })=>{
8653
- defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !0), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !1);
8653
+ defaults_F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "layers", !1), !1 === experiments.topLevelAwait && console.warn("`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration."), D(experiments, "topLevelAwait", !0), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !1);
8654
8654
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
8655
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.1"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
8655
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.5.2"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
8656
8656
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties, mode, uniqueName, inlineConst })=>{
8657
8657
  if (assertNotNill(module.parser), assertNotNill(module.generator), defaults_F(module.parser, "asset", ()=>({})), assertNotNill(module.parser.asset), defaults_F(module.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module.parser.asset.dataUrlCondition && D(module.parser.asset.dataUrlCondition, "maxSize", 8096), defaults_F(module.parser, "javascript", ()=>({})), assertNotNill(module.parser.javascript), ((parserOptions, { inlineConst })=>{
8658
8658
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
@@ -10295,7 +10295,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
10295
10295
  });
10296
10296
  }
10297
10297
  }
10298
- let CORE_VERSION = "1.5.1", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
10298
+ let CORE_VERSION = "1.5.2", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
10299
10299
 
10300
10300
  Help:
10301
10301
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -11579,7 +11579,7 @@ Help:
11579
11579
  obj.children = this.stats.map((stat, idx)=>{
11580
11580
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
11581
11581
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
11582
- }), childOptions.version && (obj.rspackVersion = "1.5.1", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11582
+ }), childOptions.version && (obj.rspackVersion = "1.5.2", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
11583
11583
  let mapError = (j, obj)=>({
11584
11584
  ...obj,
11585
11585
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -12479,7 +12479,7 @@ Help:
12479
12479
  object.hash = context.getStatsCompilation(compilation).hash;
12480
12480
  },
12481
12481
  version: (object)=>{
12482
- object.version = "5.75.0", object.rspackVersion = "1.5.1";
12482
+ object.version = "5.75.0", object.rspackVersion = "1.5.2";
12483
12483
  },
12484
12484
  env: (object, _compilation, _context, { _env })=>{
12485
12485
  object.env = _env;
@@ -15401,6 +15401,7 @@ Help:
15401
15401
  serverUrl: schemas_string(),
15402
15402
  prefix: schemas_string()
15403
15403
  }).partial(), incremental = strictObject({
15404
+ silent: schemas_boolean(),
15404
15405
  make: schemas_boolean(),
15405
15406
  inferAsyncModules: schemas_boolean(),
15406
15407
  providedExports: schemas_boolean(),
@@ -15793,7 +15794,7 @@ Help:
15793
15794
  let _options = JSON.stringify(options || {});
15794
15795
  return binding_default().transform(source, _options);
15795
15796
  }
15796
- let exports_rspackVersion = "1.5.1", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
15797
+ let exports_rspackVersion = "1.5.2", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
15797
15798
  getNormalizedRspackOptions: getNormalizedRspackOptions,
15798
15799
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
15799
15800
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
@@ -363,6 +363,7 @@ export declare const getRspackOptionsSchema: () => z.ZodObject<{
363
363
  css: z.ZodOptional<z.ZodBoolean>;
364
364
  layers: z.ZodOptional<z.ZodBoolean>;
365
365
  incremental: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"safe">]>, z.ZodLiteral<"advance">]>, z.ZodLiteral<"advance-silent">]>, z.ZodObject<{
366
+ silent: z.ZodOptional<z.ZodBoolean>;
366
367
  make: z.ZodOptional<z.ZodBoolean>;
367
368
  inferAsyncModules: z.ZodOptional<z.ZodBoolean>;
368
369
  providedExports: z.ZodOptional<z.ZodBoolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -60,7 +60,7 @@
60
60
  "dependencies": {
61
61
  "@module-federation/runtime-tools": "0.18.0",
62
62
  "@rspack/lite-tapable": "1.0.1",
63
- "@rspack/binding": "1.5.1"
63
+ "@rspack/binding": "1.5.2"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@swc/helpers": ">=0.5.1"