Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/bundler-rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@kmijs/bundler-shared": "workspace:*",
"@kmijs/bundler-shared-config": "workspace:*",
"@kmijs/shared": "workspace:*",
"@kmijs/swc-plugin-auto-css-modules": "0.0.1",
"@kmijs/swc-plugin-auto-css-modules": "0.1.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js engine constraint inconsistent with dependency requirements

The bundler-rspack package declares engine support for Node.js ^14.18.0 || >=16.10.0, but the upgraded @rspack/core@1.6.8 dependency now requires node: '>=18.12.0'. Users running on Node.js 14.x or 16.x may encounter runtime failures since the actual minimum Node.js version is now 18.12.0. The engines field in bundler-rspack and potentially bundler-shared needs updating to reflect the new requirement.

Additional Locations (1)

Fix in Cursor Fix in Web

"@swc/helpers": "0.5.15",
"postcss": "8.4.21",
"react-error-overlay": "6.0.9"
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
},
"dependencies": {
"@kmijs/shared": "workspace:*",
"@rspack/core": "1.4.8",
"@rspack/core": "1.6.8",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify @rspack/core version 1.6.8 existence

# Check if version 1.6.8 exists
echo "=== Checking if @rspack/core@1.6.8 exists ==="
npm view @rspack/core@1.6.8 version 2>&1

# Get available versions between 1.4.8 and 1.6.8
echo -e "\n=== Available versions between 1.4.8 and 1.6.8 ==="
npm view @rspack/core versions --json 2>&1 | jq -r '.[]' | grep -E '^1\.(4|5|6)' | sort -V

Repository: kmijs/kmi

Length of output: 553


🌐 Web query:

@rspack/core 1.6.8 changelog release notes

💡 Result:

@rspack/core v1.6.8 — published Dec 17, 2025. See the release listing and Rspack release activity for details. (releasealert.dev)

Citations:


🌐 Web query:

@rspack/core breaking changes migration 1.4 to 1.6

💡 Result:

Here are the main breaking changes and migration actions when moving @rspack/core from 1.4 → 1.6 (concise checklist):

  • CSS builtins removed — replace builtins.css with the new CSS options (module.parser / module.generator) and switch any usages of builtins CSS plugins to the new plugins (e.g., use rspack.LightningCssMinimizerRspackPlugin). Update CSS-related config accordingly. (rspack.rs)

  • New tree-shaking algorithm / ESM output changes — 1.6 improves/enables a new tree-shaking behavior and ESM output handling; verify dynamic-import patterns and expect different tree-shake results (may need to adjust imports or sideEffects). Test bundles and adjust code that relied on prior dead-code retention. (rspack.rs)

  • Remove compiler.build and compiler.rebuild — code calling these internal APIs must be updated (use the supported public APIs / runner patterns instead). (rspack.rs)

  • experiments.* option removals / defaults changed — some experiments flags were removed or defaulted (e.g., disableApplyEntryLazily removed; new resolver enabled by default earlier). Audit your experiments.* usage and remove or adapt configs that targeted removed flags. (rspack.rs)

  • SWC plugin / SWC core version bumps — if you use SWC Wasm plugins (e.g., @swc/plugin-emotion), upgrade them to versions compatible with the newer swc_core used by Rspack 1.4→1.6 to avoid build errors. Also check minimizer option shape changes (e.g., passes → compress.passes). (rspack.rs)

  • Lazy compilation middleware change (from 1.4) — middleware now reads lazyCompilation from the compiler; remove manual passing of that option if you followed earlier examples. Confirm any custom dev-server middleware is updated. (rspack.rs)

  • General plugin API / builtin adjustments — some builtins were removed or renamed; search your config for usages of removed builtins (SwcCssMinimizerRspackPlugin → LightningCssMinimizerRspackPlugin, builtins.* options) and replace accordingly. (rspack.rs)

Quick migration steps

  1. Run tests and a full build locally and in CI; capture failures.
  2. Search your config for: builtins., experiments., compiler.build/rebuild, old minimizer/plugin names, SWC plugin imports, and resolve.extensions; update per notes above. (rspack.rs)
  3. Upgrade SWC-related plugins to versions compatible with swc_core used by 1.6. (rspack.rs)
  4. Inspect bundle output (tree-shaken modules, ESM artifacts) and adjust code that relied on previous bundling behaviors. (rspack.rs)

If you want, tell me where your current config or code calls the removed APIs (paste snippets) and I’ll provide exact replacements.

Citations:


🏁 Script executed:

#!/bin/bash
# Search for breaking change patterns in the codebase

# Search for CSS builtins usage
echo "=== Searching for CSS builtins usage ==="
rg "builtins\.css|builtins\." --type js --type json --type ts 2>/dev/null | head -20

# Search for compiler.build/rebuild usage
echo -e "\n=== Searching for compiler.build/rebuild usage ==="
rg "compiler\.(build|rebuild)" --type js --type ts 2>/dev/null | head -20

# Search for experiments config
echo -e "\n=== Searching for experiments config ==="
rg "experiments\s*:" --type json --type js 2>/dev/null | head -20

# Search for rspack config files
echo -e "\n=== Searching for rspack config files ==="
find . -name "rspack*.config.*" -o -name "webpack.config.*" 2>/dev/null | grep -v node_modules | head -20

# Check the actual bundler-shared package.json content
echo -e "\n=== Current @rspack/core dependency in bundler-shared ==="
cat packages/bundler-shared/package.json | grep -A 2 -B 2 "@rspack/core"

Repository: kmijs/kmi

Length of output: 50367


🏁 Script executed:

#!/bin/bash
# More targeted search for rspack config and breaking change patterns

# Find rspack config files
echo "=== Finding rspack config files ==="
find . -type f -name "*rspack*.config.*" 2>/dev/null | head -20

# Check bundler-shared package.json dependencies
echo -e "\n=== Dependencies in bundler-shared/package.json (lines 130-140) ==="
sed -n '130,140p' packages/bundler-shared/package.json

# Search for any SWC minimizer configuration patterns
echo -e "\n=== Searching for minimizer/SWC config ==="
rg "SwcCssMinimizerRspackPlugin|LightningCssMinimizerRspackPlugin|minimizer" --type json --type js 2>/dev/null | grep -v node_modules | head -20

# Search for any experiments config in source files
echo -e "\n=== Checking for experiments config in bundler files ==="
find packages/bundler-shared -type f \( -name "*.js" -o -name "*.ts" -o -name "*.json" \) -exec grep -l "experiments" {} \; 2>/dev/null

Repository: kmijs/kmi

Length of output: 50365


Verify the @rspack/core version upgrade and check for breaking changes.

The version upgrade from 1.4.8 to 1.6.8 (skipping 1.5.x) has been confirmed—1.6.8 was published on Dec 17, 2025. However, significant breaking changes exist between these versions:

  • CSS builtins removed: Replace builtins.css with new CSS options (module.parser / module.generator). Update any SWC CSS minimizer plugin references (e.g., SwcCssMinimizerRspackPluginLightningCssMinimizerRspackPlugin).
  • Tree-shaking and ESM output changes: 1.6 introduces improved tree-shaking behavior; verify dynamic-import patterns and test bundle output.
  • Removed APIs: compiler.build and compiler.rebuild internal APIs were removed; switch to supported public APIs if used.
  • experiments. options*: Some experiment flags were removed or defaulted; audit config for removed flags.
  • SWC plugin compatibility: If using SWC Wasm plugins, upgrade them to versions compatible with the newer swc_core used by Rspack 1.6.

Run a full build locally and in CI, inspect bundle output for tree-shaken modules and ESM artifacts, and test that no config references removed builtins or internal APIs.

🤖 Prompt for AI Agents
In packages/bundler-shared/package.json around line 133, the dependency bump of
@rspack/core from 1.4.8→1.6.8 introduces breaking changes; audit and update
configs and code: search and replace any use of builtins.css with the new CSS
config (module.parser/module.generator), replace SWC CSS minimizer plugin
references (e.g., SwcCssMinimizerRspackPlugin →
LightningCssMinimizerRspackPlugin) and upgrade any SWC wasm plugins to versions
compatible with the swc_core used by Rspack 1.6; search for removed internal
APIs (compiler.build / compiler.rebuild) and migrate to supported public APIs;
review experiments.* flags for removed/defaulted options and remove or adjust
them; then run a full local and CI build, inspect bundle outputs for changed
tree-shaking/ESM behavior (verify dynamic-imports and removed modules), run
tests, and fix any regressions discovered.

"@swc/helpers": "0.5.15",
"es5-imcompatible-versions": "^0.1.78",
"esbuild": "0.17.19",
Expand Down
Loading
Loading