@rspack/core 0.5.9-canary-845e837-20240327011520 → 0.5.9-canary-498d329-20240328011704

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/dist/Compiler.js CHANGED
@@ -145,6 +145,7 @@ class Compiler {
145
145
  __classPrivateFieldSet(this, _Compiler_disabledHooks, [], "f");
146
146
  __classPrivateFieldSet(this, _Compiler_nonSkippableRegisters, [], "f");
147
147
  __classPrivateFieldSet(this, _Compiler_moduleExecutionResultsMap, new Map(), "f");
148
+ new builtin_plugin_1.JsLoaderRspackPlugin(this).apply(this);
148
149
  new ExecuteModulePlugin_1.default().apply(this);
149
150
  }
150
151
  /**
@@ -634,12 +635,23 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
634
635
  };
635
636
  const ret = await queried.promise(data);
636
637
  return [ret, data];
638
+ }),
639
+ registerContextModuleFactoryAfterResolveTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createRegisterTaps).call(this, binding.RegisterJsTapKind.ContextModuleFactoryAfterResolve, () => this.compilationParams.contextModuleFactory.hooks.afterResolve, queried => async (arg) => {
640
+ const data = {
641
+ request: arg.request,
642
+ context: arg.context,
643
+ fileDependencies: arg.fileDependencies,
644
+ missingDependencies: arg.missingDependencies,
645
+ contextDependencies: arg.contextDependencies,
646
+ factoryMeta: arg.factoryMeta,
647
+ createData: arg.createData
648
+ };
649
+ return await queried.promise(data);
637
650
  })
638
651
  }, "f");
639
652
  __classPrivateFieldSet(this, _Compiler_instance, new instanceBinding.Rspack(rawOptions, this.builtinPlugins, {
640
653
  normalModuleFactoryCreateModule: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_normalModuleFactoryCreateModule).bind(this),
641
- normalModuleFactoryResolveForScheme: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_normalModuleFactoryResolveForScheme).bind(this),
642
- contextModuleFactoryAfterResolve: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_contextModuleFactoryAfterResolve).bind(this)
654
+ normalModuleFactoryResolveForScheme: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_normalModuleFactoryResolveForScheme).bind(this)
643
655
  }, __classPrivateFieldGet(this, _Compiler_registers, "f"), (0, fileSystem_1.createThreadsafeNodeFSFromRaw)(this.outputFileSystem)), "f");
644
656
  callback(null, __classPrivateFieldGet(this, _Compiler_instance, "f"));
645
657
  }, _Compiler_updateNonSkippableRegisters = function _Compiler_updateNonSkippableRegisters() {
@@ -657,12 +669,11 @@ _Compiler_instance = new WeakMap(), _Compiler_disabledHooks = new WeakMap(), _Co
657
669
  });
658
670
  }
659
671
  }, _Compiler_updateDisabledHooks = function _Compiler_updateDisabledHooks(callback) {
660
- var _a, _b, _c;
672
+ var _a, _b;
661
673
  const disabledHooks = [];
662
674
  const hookMap = {
663
- contextModuleFactoryAfterResolve: (_a = this.compilationParams) === null || _a === void 0 ? void 0 : _a.contextModuleFactory.hooks.afterResolve,
664
- normalModuleFactoryCreateModule: (_b = this.compilationParams) === null || _b === void 0 ? void 0 : _b.normalModuleFactory.hooks.createModule,
665
- normalModuleFactoryResolveForScheme: (_c = this.compilationParams) === null || _c === void 0 ? void 0 : _c.normalModuleFactory.hooks.resolveForScheme
675
+ normalModuleFactoryCreateModule: (_a = this.compilationParams) === null || _a === void 0 ? void 0 : _a.normalModuleFactory.hooks.createModule,
676
+ normalModuleFactoryResolveForScheme: (_b = this.compilationParams) === null || _b === void 0 ? void 0 : _b.normalModuleFactory.hooks.resolveForScheme
666
677
  };
667
678
  for (const [name, hook] of Object.entries(hookMap)) {
668
679
  if (typeof hook !== "undefined" &&
@@ -1,10 +1,9 @@
1
- import { AsyncSeriesBailHook } from "tapable";
2
1
  import * as liteTapable from "./lite-tapable";
3
2
  import { ResolveData } from "./Module";
4
3
  export declare class ContextModuleFactory {
5
4
  hooks: {
6
5
  beforeResolve: liteTapable.AsyncSeriesBailHook<[ResolveData], false | void>;
7
- afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
6
+ afterResolve: liteTapable.AsyncSeriesBailHook<[ResolveData], false | void>;
8
7
  };
9
8
  constructor();
10
9
  }
@@ -24,7 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ContextModuleFactory = void 0;
27
- const tapable_1 = require("tapable");
28
27
  const liteTapable = __importStar(require("./lite-tapable"));
29
28
  class ContextModuleFactory {
30
29
  constructor() {
@@ -43,7 +42,7 @@ class ContextModuleFactory {
43
42
  // factorize: new AsyncSeriesBailHook(["resolveData"]),
44
43
  // /** @type {AsyncSeriesBailHook<[ResolveData], false | void>} */
45
44
  beforeResolve: new liteTapable.AsyncSeriesBailHook(["resolveData"]),
46
- afterResolve: new tapable_1.AsyncSeriesBailHook(["resolveData"])
45
+ afterResolve: new liteTapable.AsyncSeriesBailHook(["resolveData"])
47
46
  // /** @type {AsyncSeriesBailHook<[ResolveData["createData"], ResolveData], Module | void>} */
48
47
  // createModule: new AsyncSeriesBailHook(["createData", "resolveData"]),
49
48
  // /** @type {SyncWaterfallHook<[Module, ResolveData["createData"], ResolveData], Module>} */
@@ -4,4 +4,6 @@ exports.JsLoaderRspackPlugin = void 0;
4
4
  const binding_1 = require("@rspack/binding");
5
5
  const base_1 = require("./base");
6
6
  const loader_runner_1 = require("../loader-runner");
7
- exports.JsLoaderRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.JsLoaderRspackPlugin, (compiler) => loader_runner_1.runLoaders.bind(null, compiler), "compilation");
7
+ exports.JsLoaderRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.JsLoaderRspackPlugin, (compiler) => loader_runner_1.runLoaders.bind(null, compiler),
8
+ /* Not Inheretable */
9
+ "thisCompilation");
@@ -137,7 +137,6 @@ class RspackOptionsApply {
137
137
  if (options.experiments.asyncWebAssembly) {
138
138
  new builtin_plugin_1.AsyncWebAssemblyModulesPlugin().apply(compiler);
139
139
  }
140
- new builtin_plugin_1.JsLoaderRspackPlugin(compiler).apply(compiler);
141
140
  if (options.experiments.rspackFuture.disableApplyEntryLazily) {
142
141
  applyEntryOptions(compiler, options);
143
142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.5.9-canary-845e837-20240327011520",
3
+ "version": "0.5.9-canary-498d329-20240328011704",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -56,8 +56,8 @@
56
56
  "styled-components": "^6.0.8",
57
57
  "terser": "5.27.2",
58
58
  "wast-loader": "^1.11.4",
59
- "@rspack/core": "0.5.9-canary-845e837-20240327011520",
60
- "@rspack/plugin-minify": "^0.5.9-canary-845e837-20240327011520"
59
+ "@rspack/core": "0.5.9-canary-498d329-20240328011704",
60
+ "@rspack/plugin-minify": "^0.5.9-canary-498d329-20240328011704"
61
61
  },
62
62
  "dependencies": {
63
63
  "@module-federation/runtime-tools": "0.0.8",
@@ -72,7 +72,7 @@
72
72
  "webpack-sources": "3.2.3",
73
73
  "zod": "^3.21.4",
74
74
  "zod-validation-error": "1.3.1",
75
- "@rspack/binding": "0.5.9-canary-845e837-20240327011520"
75
+ "@rspack/binding": "0.5.9-canary-498d329-20240328011704"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@swc/helpers": ">=0.5.1"