hadars 0.1.39-rc.1 → 0.1.39

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/cli.js CHANGED
@@ -1307,25 +1307,6 @@ var buildCompilerConfig = (entry, opts, includeHotPlugin) => {
1307
1307
  }
1308
1308
  }
1309
1309
  const extraPlugins = [];
1310
- if (!isServerBuild) {
1311
- extraPlugins.push({
1312
- apply(compiler) {
1313
- compiler.hooks.compilation.tap("HadarsWorkerChunkLoading", (compilation) => {
1314
- compilation.hooks.childCompiler.tap(
1315
- "HadarsWorkerChunkLoading",
1316
- (childCompiler) => {
1317
- const lib = childCompiler.options?.output?.library;
1318
- const libType = typeof lib === "string" ? lib : lib?.type;
1319
- if (libType) return;
1320
- if (childCompiler.options?.output) {
1321
- childCompiler.options.output.chunkLoading = "import-scripts";
1322
- }
1323
- }
1324
- );
1325
- });
1326
- }
1327
- });
1328
- }
1329
1310
  const defineValues = { ...opts.define ?? {} };
1330
1311
  if (!isServerBuild && opts.reactMode !== void 0) {
1331
1312
  defineValues["process.env.NODE_ENV"] = JSON.stringify(opts.reactMode);
package/dist/ssr-watch.js CHANGED
@@ -208,25 +208,6 @@ var buildCompilerConfig = (entry2, opts, includeHotPlugin) => {
208
208
  }
209
209
  }
210
210
  const extraPlugins = [];
211
- if (!isServerBuild) {
212
- extraPlugins.push({
213
- apply(compiler) {
214
- compiler.hooks.compilation.tap("HadarsWorkerChunkLoading", (compilation) => {
215
- compilation.hooks.childCompiler.tap(
216
- "HadarsWorkerChunkLoading",
217
- (childCompiler) => {
218
- const lib = childCompiler.options?.output?.library;
219
- const libType = typeof lib === "string" ? lib : lib?.type;
220
- if (libType) return;
221
- if (childCompiler.options?.output) {
222
- childCompiler.options.output.chunkLoading = "import-scripts";
223
- }
224
- }
225
- );
226
- });
227
- }
228
- });
229
- }
230
211
  const defineValues = { ...opts.define ?? {} };
231
212
  if (!isServerBuild && opts.reactMode !== void 0) {
232
213
  defineValues["process.env.NODE_ENV"] = JSON.stringify(opts.reactMode);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hadars",
3
- "version": "0.1.39-rc.1",
3
+ "version": "0.1.39",
4
4
  "description": "Minimal SSR framework for React — rspack, HMR, TypeScript, Bun/Node/Deno",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
@@ -67,7 +67,7 @@
67
67
  }
68
68
  },
69
69
  "optionalDependencies": {
70
- "@rspack/core": "1.4.9",
70
+ "@rspack/core": "1.7.8",
71
71
  "@rspack/dev-server": "^1.2.1",
72
72
  "@rspack/plugin-react-refresh": "^1.6.1",
73
73
  "@swc/core": "^1.15.18",
@@ -267,41 +267,6 @@ const buildCompilerConfig = (
267
267
 
268
268
  const extraPlugins: any[] = [];
269
269
 
270
- // Built-in plugin: force classic chunk loading for web worker sub-compilations.
271
- // Without this, worker child compilers inherit the parent's outputModule:true context
272
- // and may emit ES module chunks that cannot be loaded inside classic workers
273
- // via importScripts. Applied to client builds only — SSR doesn't spawn workers.
274
- if (!isServerBuild) {
275
- extraPlugins.push({
276
- apply(compiler: any) {
277
- compiler.hooks.compilation.tap('HadarsWorkerChunkLoading', (compilation: any) => {
278
- compilation.hooks.childCompiler.tap(
279
- 'HadarsWorkerChunkLoading',
280
- (childCompiler: any) => {
281
- // Only target child compilers that have no explicit library
282
- // configuration — those are the ones rspack creates for
283
- // `new Worker(new URL(...))` entries. Internal rspack child
284
- // compilers (HtmlRspackPlugin, chunk-splitting, etc.) carry a
285
- // library config (often { type: 'module', name: '' }) and
286
- // must be left untouched: forcing outputModule:false on them
287
- // while library.type === 'module' triggers the rspack
288
- // ModuleLibraryPlugin "name can't be empty" panic.
289
- // NOTE: we intentionally do NOT set experiments.outputModule
290
- // here — that field lives on internal compilations and
291
- // modifying it is what causes the panic. Setting
292
- // chunkLoading alone is sufficient to fix classic workers.
293
- const lib = childCompiler.options?.output?.library;
294
- const libType = typeof lib === 'string' ? lib : lib?.type;
295
- if (libType) return;
296
- if (childCompiler.options?.output) {
297
- childCompiler.options.output.chunkLoading = 'import-scripts';
298
- }
299
- },
300
- );
301
- });
302
- },
303
- });
304
- }
305
270
  const defineValues: Record<string, string> = { ...(opts.define ?? {}) };
306
271
  // When reactMode overrides the React runtime we must also set process.env.NODE_ENV
307
272
  // so React picks its dev/prod bundle, independently of the rspack build mode.